Message282956
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) |
|
Date |
User |
Action |
Args |
2016-12-12 01:42:05 | ncoghlan | set | recipients:
+ ncoghlan, brett.cannon, vinay.sajip, jaraco, eric.araujo, Arfrever, eric.snow, serhiy.storchaka |
2016-12-12 01:42:04 | ncoghlan | set | messageid: <1481506924.94.0.769855159834.issue16737@psf.upfronthosting.co.za> |
2016-12-12 01:42:04 | ncoghlan | link | issue16737 messages |
2016-12-12 01:42:02 | ncoghlan | create | |
|