[IPython-User] modify a running script
Thu Sep 22 17:07:18 CDT 2011
On Thu, Sep 22, 2011 at 10:38 AM, 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?
You can try and except KeyboardInterrupt, or register a signal handler
for it as demoed here:
def signal_handler(signal, frame):
print 'you can embed some logic here when user pressed Ctrl+C!'
print 'Press Ctrl+C'
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
More information about the IPython-User