sys.argv[0] - Returns path and filename.
Emile van Sebille
emile at fenx.com
Thu Jun 27 11:35:24 EDT 2002
Guy
> The only major problem that I have come across at the moment is the
> argv[0], on my win32 box it retruns the path and a filename, on the
> mac osx and the linux only the filename are returned.
>
What you get is the almost the same on win2k and linux when similarly
invoked.
F:\Python22>python test.py
['test.py']
F:\Python22>test.py
['F:\\Python22\\test.py']
[emile at lnxfc emile]$ python test.py
['test.py']
[emile at lnxfc emile]$ test.py
['./test.py']
[emile at lnxfc emile]$ /home/emile/test.py
['/home/emile/test.py']
--
Emile van Sebille
emile at fenx.com
---------
More information about the Python-list
mailing list