This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Arfrever, brett.cannon, eric.araujo, eric.snow, jaraco, ncoghlan, serhiy.storchaka, vinay.sajip
Date 2016-12-12.01:42:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1481506924.94.0.769855159834.issue16737@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2016-12-12 01:42:05ncoghlansetrecipients: + ncoghlan, brett.cannon, vinay.sajip, jaraco, eric.araujo, Arfrever, eric.snow, serhiy.storchaka
2016-12-12 01:42:04ncoghlansetmessageid: <1481506924.94.0.769855159834.issue16737@psf.upfronthosting.co.za>
2016-12-12 01:42:04ncoghlanlinkissue16737 messages
2016-12-12 01:42:02ncoghlancreate