[Python-Dev] sys.path file feature

Wolfgang tds333 at mailbox.org
Sat Sep 10 04:37:24 EDT 2016


Hi,

tracking the commit log I have noticed for Windows there was added a new 
feature which is very interesting and can also be useful for other 
platforms.

If I read it right it supports adding a sys.path text file near the 
executable to specify the Python sys.path variable and overwriting the 
default behavior.

https://hg.python.org/cpython/rev/03517dd54977


This change is only for Windows (if I read right). But I think it is 
thus valuable to add this in common as general rule. This also 
simplifies and unifies virtual environment creating and standalone 
redistribution.

Also I have one remaining question, is the "*.pth" file handling then
disabled by this feature?

If yes, can this be a problem in a virtual environment if a package uses
a pth file installed in the virtual environment site-packages directory?


Overall I think this is a great addition and the start to unify sys.path
handling. And a good feature for redistribution of a Python interpreter 
without an installation. (Embedding, virtual environments, fat virtual 
environments, ...)

Regards,

Wolfgang


More information about the Python-Dev mailing list