Stefan Ram <[email protected]> wrote:
> [email protected] (Stefan Ram) writes:
> >except Exception as inst:
> > print( traceback.format_exc() )
>
> More to the point of getting the line number:
As I wrote in my initial posting:
I already have the line number. I am looking for the source code line!
So far I use:
m = re.search(r'\n\s*(.+)\n.*\n$',traceback.format_exc())
if m: print('%s %s' % (prefix,m.group(1)))
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart E-Mail: [email protected]
Allmandring 30a Tel: ++49-711-68565868
70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/
--
https://mail.python.org/mailman/listinfo/python-list