On Nov 28, 9:04 am, Joel Davis <callmeclaud...@gmail.com> wrote: > > try: > > raise None > > except: > > import sys > > from traceback import extract_tb, extract_stack > > frame = sys.exc_info()[2].tb_frame.f_back > > calling_file = extract_stack(frame, 2)[1][0] > > code works perfectly except on my system both the indexes need to be 0 > (eg: "extract_stack(frame, 2)[0][0]")
I thought the 0 was myself, 1 my caller, etc. But tx for trying it -- http://mail.python.org/mailman/listinfo/python-list