[IPython-User] modify a running script
Fri Sep 23 13:46:20 CDT 2011
On Thu, Sep 22, 2011 at 10:38, Piotr Zolnierczuk <
> I came across this an interesting new use case.
> A user wants to run a (long running experiment control) script and pause it
> at some point, modify something (e.g. a variable) and continue the
> My answer was to use pdb from within ipython. Is there (out there) anything
> else that could be used for this?
An alternative to pdb (but similar, in that it involves setting breakpoints
beforehand), is to stick IPython.embed() calls, to drop into an IPython
shell with the local namespace. You can use Paul's idea of a sigint handler
to activate a switch, if you only want to drop into IPython sometimes.
> Piotr Adam Zolnierczuk
> e-mail: firstname.lastname@example.org
> www: http://www.zolnierczuk.net
> written on recycled electrons
> IPython-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User