[issue1507224] sys.path issue if sys.prefix contains a colon

Ronald Oussoren report at bugs.python.org
Thu Nov 14 16:46:13 CET 2013


Ronald Oussoren added the comment:

AFAIK this still is a problem, although as Brett mentioned you have to do some work to end up with a non-functional install.

I ran into this in the context of py2app, that output of py2app basically contains a "portable" python installation and users can change the value of sys.prefix by dragging the application into a different folder. When applications are launched from a folder whose name contains a colon the application currently does not launch due to this problem.

I have no idea yet as to how to cleanly the py2app problem. I'll probably end up with a symlink hack for that ;-(

It should be easy enough to provide a patch for 3.5 that uses an array of path elements instead of the raw $PYTHONPATH value, but that requires changes to Python's startup code and I'll probably just try to contribute to Nick's plans to cleanup the APIs for interpreter configuration (PEP 432) instead of providing a patch here.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1507224>
_______________________________________


More information about the Python-bugs-list mailing list