How to create a script that list itself ?

calfdog at yahoo.com calfdog at yahoo.com
Tue Jan 10 00:06:07 CET 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