[IPython-User] modify a running script

Piotr Zolnierczuk piotr.zolnierczuk@gmail....
Fri Sep 23 14:48:13 CDT 2011


I am already running IPython (0.11) - the method you described only works
for "regular" python, right?



On Fri, Sep 23, 2011 at 2:46 PM, MinRK <benjaminrk@gmail.com> wrote:

>
>
> On Thu, Sep 22, 2011 at 10:38, Piotr Zolnierczuk <
> piotr.zolnierczuk@gmail.com> wrote:
>
>> Hi,
>>
>> 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
>> execution.
>>
>> 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
>>
>> --
>>
>> Piotr Adam Zolnierczuk
>> e-mail: piotr@zolnierczuk.net
>> www:   http://www.zolnierczuk.net
>> _____________________________________
>> written on recycled electrons
>>
>>
>>
>> _______________________________________________
>> IPython-User mailing list
>> IPython-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>
>>
>


-- 

Piotr Adam Zolnierczuk
e-mail: piotr@zolnierczuk.net
www:   http://www.zolnierczuk.net
_____________________________________
written on recycled electrons
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20110923/59ba0861/attachment.html 


More information about the IPython-User mailing list