Nick Coghlan added the comment:

Something we don't really have anywhere is a short summary of how sys.path[0] 
gets initialised - it's scattered through the descriptions of the various 
invocation options in 
https://docs.python.org/3/using/cmdline.html#interface-options

I figure it's also worth mentioning https://bugs.python.org/issue13475 where we 
discussed the idea of a "--nopath0" option so folks could easily disable 
imports from the current directory (-c, -m) or from the script directory 
(direct execution) without otherwise impacting startup behaviour. (Specifying 
--nopath0, and then requesting execution of a directory or zipfile would 
necessarily be an error, since modifying sys.path[0] is an essential part of 
making those work)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16737>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to