python interpreter: interrupt and continue

After I interrupt execution in Python interpreter (using CTRL-BREAK in Windows), can I continue execution?

If not, is there any other way to interactively pause execution (so I can view variable values), and then continue?

I prefer not to use the debugger because it's much slower than normal execution.


I don't know if you mean pdb by debugger , but if you don't (and it might be helpful for others here), you can try:

  • http://docs.python.org/library/pdb.html
  • Here's a nice tutorial btw:

  • http://onlamp.com/pub/a/python/2005/09/01/debugger.html

  • I found some useful links that kinda answer my question:

    http://blog.devork.be/2009/07/how-to-bring-running-python-program.html

    How do I attach a remote debugger to a Python process?

    http://wiki.python.org/moin/DebuggingWithGdb

    Is there a way to attach a debugger to a multi-threaded Python process?

    Overall, it seems winpdb can do what I need (I'm under Windows), but I haven't tested it.

    链接地址: http://www.djcxy.com/p/48852.html

    上一篇: weakhashmap如何工作?

    下一篇: python解释器:中断并继续