How to extract complete file path from traceback info

Kenneth McDonald kenneth.m.mcdonald at
Fri Jun 18 23:31:03 CEST 2004

I have a need to customize the output of Python error tracebacks,
and to that end I've implemented my own sys.excepthook function.
However, one remaining problem that I'm having is the information
passed to this function doesn't seem to have the _full_ path name
of the file in which the exception occurred. I need this because
the output is being parsed by an editor (jEdit) which uses this
information to set up links to errors origins in the source

Is there an easy way to get this info somehow? (I haven't been
able to find it.) I can think of some 'solutions' I'd prefer
not to attempt unless I have to.

Ken McDonald

More information about the Python-list mailing list