Skip to content

Commit

Permalink
Merge pull request ipython#3753 from ivanov/ctrl-c-for-kernel
Browse files Browse the repository at this point in the history
document Ctrl-C not working in ipython kernel
  • Loading branch information
ivanov committed Jul 25, 2013
2 parents fb402a5 + 4afc3a9 commit b9935fb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions IPython/kernel/zmq/kernelapp.py
Expand Up @@ -99,6 +99,16 @@
kernel_aliases.update(session_aliases)
kernel_flags.update(session_flags)

_ctrl_c_message = """\
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.
To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\\ in UNIX-like environments.
To read more about this, see https://github.com/ipython/ipython/issues/2049
"""

#-----------------------------------------------------------------------------
# Application class for starting an IPython Kernel
#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -335,6 +345,7 @@ def log_connection_info(self):
self.log.info(line)
# also raw print to the terminal if no parent_handle (`ipython kernel`)
if not self.parent_handle:
io.rprint(_ctrl_c_message)
for line in lines:
io.rprint(line)

Expand Down

0 comments on commit b9935fb

Please sign in to comment.