[issue33180] Flag for unusable sys.executable

Nick Coghlan report at bugs.python.org
Thu Mar 29 11:37:46 EDT 2018


Nick Coghlan <ncoghlan at gmail.com> added the comment:

I'm not sure what the right solution is at the design level, but I did recently run into a quirk related to this in the embedding tests: on \*nix systems, PySys_SetProgramName affects sys.executable, while Windows ignores it.

But certainly the intention is that a non-None sys.executable should be usable the way multiprocessing and the test suite use it: as a way to run Python in a subprocess. If an embedding environment wants to support that, it can set it to something suitable, and if it doesn't, it can set it to None.

(I do sometimes wonder if subprocess should have some sys.executable-specific helpers though - rerunning Python with the same settings as the current Python requires quite a bit more than just calling sys.executable with no particular options)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33180>
_______________________________________


More information about the Python-bugs-list mailing list