How do I catch a Ctrl-Break in an InteractiveInterpreter?

jimsp jimsp at ichips.intel.com
Tue Apr 18 14:10:29 EDT 2000


I am trying to build a replacement for a test framework that provides
an interactive command shell, providing variables, expressions, control
flow
statements as well as test specific commands. I would like to build a
new
system based on python and the main command language ( that way I don't
have
to maintain the general language core ) combined with C extensions ( I
Love
Swig!) to implement the test specific commands.

I have run into a snag, using the InteractiveInterpreter class I can
catch the KeyboardInterrupt exception and restart the shell just fine,
*But* a
Ctrl-Break still causes the python interpreter to exit. Does anyone have
any
suggestions?

--james





More information about the Python-list mailing list