Amaury Forgeot d'Arc added the comment:

There is a difference between "-m" and starting the module directly:
- when running a module, its directory is inserted in front of sys.path.
- with "-m", the empty string '' is inserted in front of sys.path.

The problem with pydoc.py is that there is specific code that modifies
sys.path, and will remove the standard lib from sys.path!
Look for this comment:
   # Scripts don't get the current directory in their path by default.
We could delete three lines there and avoid to remove
dirname(sys.argv[0]) from the path.

----------
nosy: +amaury.forgeotdarc

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2029>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to