[issue34725] Py_GetProgramFullPath() odd behaviour in Windows

Steve Dower report at bugs.python.org
Wed Oct 3 14:26:29 EDT 2018


Steve Dower <steve.dower at python.org> added the comment:

I don't think anything has been agreed upon.

Currently, the launched program name is used for some things other than setting sys.executable, and I believe it should continue to be used for those. But there are also needs for overriding sys.executable to be something other than the current process (e.g. a launcher that simply loads Python into its own process, but needs a different process to be used for multiprocessing support).

Victor has been looking at the initialization process, so I'm not sure if something has already changed here yet. I'd be keen to see the getpath part of initialization be written in (frozen or limited) Python code that can be easily overridden by embedders to initialize all of these members however they like. That way everyone can equally lie about argv0/GetModuleFullPath and sys.prefix/sys.executable/etc.

Until we get there, we may just need a couple more configuration fields, and perhaps some that default to one of the others when unspecified.

----------
nosy: +vstinner

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


More information about the Python-bugs-list mailing list