Author ronaldoussoren
Recipients Arfrever, brett.cannon, ncoghlan, ronaldoussoren
Date 2013-07-10.15:17:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373469435.18.0.115114582788.issue18416@psf.upfronthosting.co.za>
In-reply-to
Content
Isn't this because the first entry of sys.path is '' when python is started without a script? All other paths on sys.path are already absolute paths (tested with a relative path in $PYTHONPATH).

If that's correct, just adding os.getcwd() instead of '' as the first entry of sys.path would fix this issue, and would also make sure that imports of modules next to the script keep working when the script uses os.chdir.

The disadvantage is that some users might depend on the current behavior :-(
History
Date User Action Args
2013-07-10 15:17:15ronaldoussorensetrecipients: + ronaldoussoren, brett.cannon, ncoghlan, Arfrever
2013-07-10 15:17:15ronaldoussorensetmessageid: <1373469435.18.0.115114582788.issue18416@psf.upfronthosting.co.za>
2013-07-10 15:17:15ronaldoussorenlinkissue18416 messages
2013-07-10 15:17:15ronaldoussorencreate