How do I...

Jeff Pinyan jeffp at
Fri Mar 10 01:58:28 CET 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 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        
PerlMonth - An Online Perl Magazine  
The Perl Archive - Articles, Forums, etc.

More information about the Python-list mailing list