finding out line numbers - traceback info

Neil Schemenauer nascheme at news.cnri.reston.va.us
Fri Aug 11 11:40:33 EDT 2000


Treutwein Guido <Guido.Treutwein at nbg.siemens.de> wrote:
>Hi there,
>
>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.

Exceptions can be instances.  Use this to your advantage.  Also,
the standard exceptions may have attributes that you can use
(such as the line number and the filename).

  Neil



More information about the Python-list mailing list