We don’t know if a newer version of Python would fix the issue. As you said, Python 3.3 works fine from Power Shell, and so does 3.5. The bug that exists for 3.3 embedded in Sublime Text may also exist with 3.5. It may not be a bug with Python at all, but rather with how clang is doing things.
Just to be clear, upgrading the version of Python bundled with Sublime Text would likely result in hundreds of thousands to millions of developers all of a sudden having a handful of their packages broken. There would probably be hundreds of package developers fielding bug reports and trying to fix the issues. At the current point, this is not a tenable option. At some point we will likely have to update the version of Python bundled due to security support ending for 3.3. I don’t think that time is right now.
Did you try running your code using the environment I described? Considering the officially released version of Python 3.3 that is bundled with build 3103 had the same issue, but does not have the issue via PowerShell makes me believe there is a subtle bug that has to do with embedding. It may be that clang looks for a pty and works differently in that situation, Windows being a second-class citizen and all. There was a bug related to this issue with the silver searcher, where it would look for a pty, and not output anything to the screen if it wasn’t there. This made the user believe the exec
build system in Sublime Text was broken.
I may have mentioned this before, but by default there is no “console” that a subprocess is attached to when Python is run embedded in a GUI app, because consoles are part of a command line interface. Such consoles are used for directly reading keystrokes from the user for secure password entry and other stuff. It is, however, possible to create a console and attach it to a subprocess. I have done this before and used it successfully. This is one of the few differences I know of between embedding Python and running it standalone on the command line.