I have an ipython kernel started via
ipython kernel
This gives me the option to connect to this kernel from different clients (console, qtconsole or even from other machine via ssh.
The simplest case is to connect locally via:
ipython qtconsole --existing kernel-xxxx.json
But if I now want to restart the kernel (usually via Ctrl+. in qtconsole), I get the message:
Cannot restart a Kernel I did not start
This is logical, but my question is:
- Is there a way to restart an IPython kernel via a connected client?
Or, if this is not possible:
- Is there a way to trigger the restart of the kernel via some other command? (from the local console, not the connected client).
I'm not looking for a way to quit the ipython kernel process (can be done via Ctrl+\), but just to restart the kernel without changing the kernel id.
Some info about my (I)Python environment:
python -c "import IPython; print(IPython.sys_info())"
{'commit_hash': u'2d95975',
'commit_source': 'repository',
'default_encoding': 'UTF-8',
'ipython_path': '/something/gits/ipython/IPython',
'ipython_version': '3.2.1',
'os_name': 'posix',
'platform': 'Linux-3.16.0-4-amd64-x86_64-with-debian-8.0',
'sys_executable': '/usr/bin/python',
'sys_platform': 'linux2',
'sys_version': '2.7.9 (default, Mar 1 2015, 12:57:24) \n[GCC 4.9.2]'}
ipython kernel.