Empty sys.path[0]
Nick Perkins
nperkins7 at home.com
Mon Jul 9 02:24:46 EDT 2001
"Gustaf Liljegren" <gustafl at algonet.se> wrote in message
news:Xns90D9116ADA12Bgustaflalgonetse at 194.213.69.148...
.... when I run it with only the filename:
>
> E:\test>python syspath.py
>
>
> Nothing! ...
hmm, strange..
In those cases, the os.getcwd should give you the right answer.
you could start scripts with:
import sys
if not sys.path[0]:
import os
sys.path[0]=os.getcwd()
More information about the Python-list
mailing list