finding out line numbers - traceback info

Warren Postma embed at NOSPAM.geocities.com
Fri Aug 11 10:54:20 EDT 2000


"Treutwein Guido" wrote:

> I'm using python for sending command sequences to smartcards, and these
> commands also get logged in a protocol file. The protocols would benefit
> from a unique reference to the original python file e. g. the line
> number.

Look at how IDLE and other programs implement debuggers. What you want is
the ability to hook code while it runs and "instrument" or trace it while it
runs. This
functionality is part of the great "introspection" power of Python.

Warren





More information about the Python-list mailing list