getting full filename under NT

Alex Martelli aleaxit at yahoo.com
Mon Oct 9 18:10:19 EDT 2000


This seems to work in my setup (2.0b2, Win98):

import sys

try: raise RuntimeError
except:
    x=sys.exc_info()[2]
    print x.tb_frame.f_code.co_filename


Placing this in alongfilename.py and running
    python alongfilename.py
results in the expected output:
alongfilename.py


Alex






More information about the Python-list mailing list