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
Support terminal use on Windows to be optional with a new default attach
for the new --console=
option.
#2682
Comments
The The second point, I don't get what flag you are talking about and why it would be needed. |
I want to make this work for standalone too, and not just onefile, where there is of course the extra step to launch a new process, such that the Python DLL never sees it, occurs. I was not immediately successful with it though. |
So, I made this to work, the change has interesting effects in case of an assertion, etc. this now raises GUI dialogs potentially, which is not a bad thing though, since they offer to debug inside of Visual Studio, which can make things a bit easier at times maybe. The code attaches to the console, and re-opens CONOUT$ and CONIN$ for stdout/stderr/stdin if they were not re-directed, I need however to check if the later works beyond stdout right now. For the command line interface this will mean big changes, with |
/dist
dir and --onefile
enhanceattach
for the new --console=
option.
So, implement the Not sure yet, how this relates to onefile. Currently accelerated and standalone are working nicely. I guess, the onefile should maybe always attach itself, so it can forward it, I shall try it out. |
So, I found that When I noticed that the When I looked at So I am either missing something fundamental or this might well be very unusable. I can, of course, patch up subprocess somehow to use pipes that throw away or get output delayed, but it seems this might not be generally doable. I am struggling to find out what outside of attaching is necessary to make the console handles inherited more automatically, which probably makes them possible to duplicate. It's looking grim though. |
#2668
https://github.com/shenjackyuanjie/wrapper-rs
in this project
I use
AttachConsole
to attach asubsystem=windows
program to it's father console (if exist) and use some other windows api to check if it's started from console or explorerNuitka can ues this to improve
--onefile
building, and create a program can use STDOUT/STDERR/STDIN when started from a console, and not creating a cmd window when staring from explorerI use process create flag to create a none conhost process when needed, and the host program also dose not contain a conhost, so you can get a clean program
The text was updated successfully, but these errors were encountered: