I have a script that is basically just a small GUI to create a config-file for a long-running-program without any graphics. I have and control the source-code for both of these.
The usual workflow of the developer-users is to open that GUI using a simple python-run-configuration, tweak some settings,and click its 'run'-button to launch the script.
This works, but the 'run'-window closes and the process appears in a shell, losing all nice features of the 'run'-window such as clickable output and the debugger UI.
I have tried two methods of starting the process: subprocess.Popen
and os.execv
.
I have also tried to set the Pycharm-run-configuration-option Execution>Emulate terminal in output console
to ticked and unticked.
I also have two alternatives that I like to avoid: use the integrated terminal (key-users don't like it, and a separate run-configuration for the main-program would be required) or make the script-launching a function call without any processes involved (requires some refactoring and care with a singleton-state)
Is there a non-hacky way to have a script like my GUI be usable from within pycharm?