Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sys.executable to launch python scripts #420

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

take-cheeze
Copy link

So that scripts like main.py is launched by same python executable used by configure.py

@mathoudebine
Copy link
Owner

Hello @take-cheeze and thanks for the PR, were you able to test it on Linux and Windows?

@take-cheeze
Copy link
Author

I've tested in macOS. Maybe windows may have some trouble so I'll test it

@take-cheeze
Copy link
Author

Seems creationflags=subprocess.DETACHED_PROCESS is required to open configure.py and main.py because with normal Popen process will be also closed with the parent process.
Though this feature is only for windows...

@mathoudebine
Copy link
Owner

I tested your new changes on Windows, but now when I click on "Save and run" from the configuration window it starts the main.py script in a new terminal window, whereas previously it started the script in background.
Same thing when main.py is running on a tray icon right click > "Configure" it starts configure.py in a terminal, not in background.
Do you see the same behavior on your machine?

@take-cheeze
Copy link
Author

I'm running it from Terminal app so it seems to be the difference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants