-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add PYAPP_IS_GUI
option
#97
Conversation
Do you mind, after you make the changes, giving me an example? Truthfully I've never used a Python GUI on Windows so I don't quite understand the issues we are solving. |
Happy to! I'll work out some changed and then make a more detailed write up on why and what. Thanks! |
Okay, this seems to be working now. The docs are still missing and I need to test this on macos, but here's a more detailed write up on the issue ProblemI packaged this GUI with The problem, turns out, is really multiple problems:
Solution (for now?)Setting the top-level crate argument (RFC 1665) doesn't work for the purpose here, since a Thus, the easy fix (but see below) is to run GUIs simply with Is this pretty?Well, it's prettier, but not ideal. The process still only displays as Apologies for the wordy explanation, I hope this makes things clearer. Let me know what you think. I'd understand if you think this is not a worthy enough improvement and/or outside of the scope of |
Quick update: Tested this on macos and the console popped up there too. I'll fix that too, update docs, and keep you posted! |
Thank you! |
3ed165d
to
18f2b48
Compare
Okay, this is now working on macos as well, with the caveat that by default, the macos console does not close after the last command is terminated (noted in docs). Otherwise, all working as described above in windows, linux, and macos. I also cleaned up the commit history a bit, hope this helps. Let me know what you think and thanks! |
--features gui
mechanism to prevent console window on program startPYAPP_IS_GUI
option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much, this is an awesome feature!
Awesome, thanks! I'm glad you enjoy the feature :) |
Related to issue #96
This draft PR is an idea to solve the issue that when packaging a GUI and running it on Windows, a console window will be opened along with running the GUI. The PR is currently incomplete and needs the following (at least):
pythonw.exe
when in full isolation modepythonw
when on Windows and not when on Linux!pythonw
should also be executed on macos...For macos: According to here,
pythonw
only needs to be used when running on Python versions<3.9
.Opening this as a draft as a start for discussion.