[IPython-dev] making pydb play nice; ipython release may imply pydb release

R. Bernstein rocky at panix.com
Sat Oct 7 08:47:25 EDT 2006


If it is the case that there is another release in 3-4 weeks and if
it's also the case that it would include (what I hope are rather
small) patches to allow pydb to be used, then it would probably be
advantageous to have another pydb release about the same time. 

Following the good practice that ipython seems to use, I make an
announcement of a posssible release in advance of the release.  That's
just been done on the sourceforge pydb mailing list.

The reason for the concurrent release is that there have been a couple
of small changes recently in pydb's CVS that may make interaction with
ipython more user-friendly. I mentioned the change to the
implementation of the "list" command.

Here's another. In order to make it possible to debug from inside
ipython (or any Python shell), I've added pydb.runl() and pydb.runv()
calls to start a debugger session. The 'l', and 'v' suffixes are
analogous to the meaning in spawnv()/execv() and spawnl()/execl()
calls.

For example, if you are in the ipython. You can do something like this:

  In [1]: import pydb
  In [2]: pydb.runl("--threading", "--nx", "/tmp/test.py", "--option1", "arg1")
to start a debugger session. 

The pydb.runv() form might look like this:

  In [3]: args=("--threading", "--nx", "/tmp/test.py", "--option1", "arg1")
  In [4]: pydb.runv(args)

Note that although pdb doesn't support command-line options (like
"--threading"), pydb does. So "--threading" and "--nx" go to the
*debugger*, and the Python script to be debugged and its options and
arguments comes after any debugger options.

Are there any other debugging annoyances working in ipython? 

Thanks.



More information about the IPython-dev mailing list