Is it a more pythonic way of finding the name of the running script
than these?

from os import sep
from sys import argv

print argv[0].split(sep)[-1]
# or
print locals()['__file__'].split(sep)[-1]
# or
print globals()['__file__'].split(sep)[-1]

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to