You do not need to “hack” this in python, you just use ipython:
ipython yourscript.py --pdb
whenever "yourscript.py" crashes, you will end up in the ipython debugger where the exception was thrown. From there, you can move the stack up and down and check variables, etc. As needed. Thanks to ipython, you even get tab completion complete.
Of course, this is not Eclipse, but it is simple and incredibly useful when developing in Python.
source share