How do I...
Jeff Pinyan
jeffp at crusoe.net
Thu Mar 9 19:58:28 EST 2000
[posted & mailed]
On Mar 9, Brett Tribble said:
>How do I find the name of the script that is currently running from within
>the script?
Read the sys.py docs (python -c 'import sys; print sys.__doc__').
import sys
print "You're running", sys.argv[0]
--
MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve japhy at pobox.com
http://www.pobox.com/~japhy/ http://pinyaj.stu.rpi.edu/
PerlMonth - An Online Perl Magazine http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
More information about the Python-list
mailing list