[IPython-user] ipdb
Brett Hoerner
bretthoerner@bretthoerner....
Sun May 27 21:25:25 CDT 2007
Via an old message related to setting tracebacks in your own programs:
> In [5]: from IPython.Debugger import Pdb
>
> In [6]: def set_trace():
> ...: Pdb().set_trace()
> ...:
> ...:
>
> In [7]: set_trace()
This only seems to work inside of the IPython shell, I would love to
have tab-completed and syntax highlighted tracebacks in my own
applications.
If I use it in a simple script I first get a traceback regarding color schemes,
"/IPython/ColorANSI.py", line 132, in __init__
raise ValueError,'you must specify the default color scheme'
I went ahead and wacked that just to see if I could get it working, I
made ColorSchemeTable.copy():
return ColorSchemeTable(self.values(),"Linux")
I then get an error about a missing __IPYTHON__,
"IPython/Debugger.py", line 290, in interaction
__IPYTHON__.set_completer_frame(frame)
I'm afraid I'm jumping into a rabbit hole at this point, so I thought
I would ask if there is an easy fix I am missing.
If not, and in the meantime, I'll continue digging on my own. :)
Thank you in advance,
Brett
More information about the IPython-user
mailing list