Name of the Script

Alex Shindich alex at shindich.com
Sun Mar 4 21:21:29 EST 2001


try the following:

import sys
print sys.argv[0]
....
The first argument in the argument list is the name of the script that got
invoked.

I hope this helps.

Regards,

Alex Shindich
visit http://www.shindich.com/sources
"stadel" <stadel at excite.com> wrote in message
news:20010304.185354.2114937732.8277 at localhost.localdomain...
> What is the method for returning the file name of the running script?
>
> Thanks in advance.
> Stadel
>





More information about the Python-list mailing list