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

Fix stdio and createprocess calls #383

Conversation

AstralStorm
Copy link

This series fixes subprocess launch and communication on Windows and allows the process to be called with pythonw.
Should also fix remaining encoding and perhaps also path issues.

Both __file__ lead to DisplayCAL submodule, but the imports are written
everywhere as if imported from top level, because that's how py2exe worked.
Python inherited stdio handles seem to not lead to Windows console,
while Wtty reads from Windows console and not stdio.
Sidestep it by creating new stdio like it used to work on old Python.
Pythonw the console-free version launches without stdio.
In certain cases, so can Python - and then sys.stdout is None.
@eoyilmaz eoyilmaz force-pushed the fix-stdio-createprocess-calls branch from 9ce7c1f to 08403fb Compare September 22, 2024 18:38
@eoyilmaz eoyilmaz merged commit de8c36f into eoyilmaz:367-compiled-sucessfully-in-w10-py311-but-createprocess-fails-call-to-dispread-to-measure Sep 23, 2024
eoyilmaz added a commit that referenced this pull request Sep 27, 2024
…e returned by the `kernel32` library instead of manually setting it to `utf-8` as `cp1252` seems to be working fine, after #383 has been merged. And, simplified a couple of `if` statements that are checking the `stdout.isatty()` value, and updated code formatting.
eoyilmaz added a commit that referenced this pull request Oct 9, 2024
eoyilmaz added a commit that referenced this pull request Oct 9, 2024
…e returned by the `kernel32` library instead of manually setting it to `utf-8` as `cp1252` seems to be working fine, after #383 has been merged. And, simplified a couple of `if` statements that are checking the `stdout.isatty()` value, and updated code formatting.
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.

2 participants