Message192817
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 :-( |
|
Date |
User |
Action |
Args |
2013-07-10 15:17:15 | ronaldoussoren | set | recipients:
+ ronaldoussoren, brett.cannon, ncoghlan, Arfrever |
2013-07-10 15:17:15 | ronaldoussoren | set | messageid: <1373469435.18.0.115114582788.issue18416@psf.upfronthosting.co.za> |
2013-07-10 15:17:15 | ronaldoussoren | link | issue18416 messages |
2013-07-10 15:17:15 | ronaldoussoren | create | |
|