How to create a script that list itself ?

calfdog at yahoo.com calfdog at yahoo.com
Mon Jan 9 18:06:07 EST 2006


########################################

import sys

path = os.path.dirname(sys.argv[0])
print "Path:%s" % (path)



######################################

If you ran this as a script,
This would print the location of where the script itself is running.



Hope it helps!

Rob




More information about the Python-list mailing list