##// END OF EJS Templates
inputhook: disable CTRL+C when a hook is active....
inputhook: disable CTRL+C when a hook is active. On systems with 'readline', it's very likely to intercept a signal during a select() call. The default SIGINT handler will schedule a KeyboardInterrupt exception to be raised as soon as possible. If ctypes is used to install a Python callback for PyOS_InputHook, this will happen as soon as the bytecode execution starts, so even if the first instruction of the callback is a `try: ... except KeyboardInterrupt` clause, it's actually too late. As ctypes doesn't allow a Python callback to raise an exception, this ends up with IPython detecting an internal error... not pretty. We must therefore ignore the SIGINT signals until we are sure the exception handler is active, in the Python callback.

File last commit:

r2661:595fc3b9
r4944:0fc80df3
Show More
__init__.py
19 lines | 541 B | text/x-python | PythonLexer
"""
Package for dealing for process execution in a callback environment, in a
portable way.
killable_process.py is a wrapper of subprocess.Popen that allows the
subprocess and its children to be killed in a reliable way, including
under windows.
winprocess.py is required by killable_process.py to kill processes under
windows.
piped_process.py wraps process execution with callbacks to print output,
in a non-blocking way. It can be used to interact with a subprocess in eg
a GUI event loop.
"""
from pipedprocess import PipedProcess