Closed aroberge closed 2 years ago
I should use something like https://github.com/ActiveState/appdirs to follow best practices as to where to save the configuration file.
Use psutil
(additional dependency) to determine the type of terminal run:
parent_pid = os.getppid()
print(psutil.Process(parent_pid).parent().name())
Detect if running from VS Code by detecting "TERM_PROGRAM in os.environ and os.environ["TERM_PROGRAM"] = "vscode"
In os.environ
FOR Pycharm:
TERMINAL_EMULATOR JetBrains-JediTerm
psutil
is not a simple python package: it failed to install on my system.
This has been implemented for quite a while now.
friendly should record information used (e.g. last language, color/theme, etc.) for the various environments (Mu, Jupyter, etc.) so that they can be used as default for subsequent runs.