Call to Python backtrace listing packages - show the exact location

rocky rocky at gnu.org
Fri May 20 04:39:25 EDT 2016


A little while ago I wrote uncompyle6 which can deparse Python C bytecode. Currently it runs on 2.6-2.7 and 3.2 and up. 

I think an underused part of that is that you can at runtime give it a bytecode offset and it will show you where inside a line you are at. It also can show the surrounding expression/statement of the parent context. 

I think it would be neat if those packages which show backtraces offered the ability to also show the expression at the point of error as well.

My trepan debuggers in fact use this in their "deparse" statement. http://python2-trepan.readthedocs.io/en/latest/commands/data/deparse.html

Pypy package https://pypi.python.org/pypi?name=uncompyle6



More information about the Python-list mailing list