eval errors tracing
Quinn Dunkan
quinn at hork.ugcs.caltech.edu
Wed Aug 22 13:38:31 EDT 2001
On 22 Aug 2001 04:06:07 -0700, Tigra <tigra_564 at mail.ru> wrote:
>> Check out the traceback module, especially the print_tb and format_tb
>> functions:
>>
>> http://www.python.org/doc/current/lib/module-traceback.html
>>
>> They are typically called like
>>
>> traceback.print_tb(sys.get_exc_info()[2])
>
>I don't want to get errors printed as the standard tools do. I want to get the
>line number and do some complicated manupulations with it (they are really more
>than just string.zfill(lineno, 4)). For now I use a dirty hack:
Then you can read the source to traceback.py and find out how it gets the line
number. Or read the reference manual about traceback objects.
More information about the Python-list
mailing list