On Sat, Mar 5, 2011 at 3:04 AM, Steven D'Aprano <steve at pearwood.info> wrote: > I think you mean that sys.path[0] will be set to the directory path. Indeed I did. > Should the current working directory continue to be included in the path > when running a sub-package module? No, it would be similar to the current difference between "python foo.py" and "python -m foo", with the former forcing path[0] to a specific directory, while the latter follows the vagaries of the current working directory. ~/devel$ cat > foo.py import sys print (repr(sys.path[0])) ~/devel$ python foo.py '/home/ncoghlan/devel' ~/devel$ python -m foo '' I'll elaborate on that point in the next update. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4