In [2]: while True:
...: sleep(2)
...:
In [1]: from time import sleep
In [2]: while True:
...: sleep(2)
...:
---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-2-4fdabcf7d3fc> in <module>()
1 while True:
----> 2 sleep(2)
3
KeyboardInterrupt:
In [3]: from IPython import sys_info; print(sys_info())
{'commit_hash': '681fd77',
'commit_source': 'installation',
'default_encoding': 'cp1252',
'ipython_path': 'C:\\dev\\bin\\Anaconda\\lib\\site-packages\\IPython',
'ipython_version': '2.1.0',
'os_name': 'nt',
'platform': 'Windows-7-6.1.7601-SP1',
'sys_executable': 'C:\\dev\\bin\\Anaconda\\python.exe',
'sys_platform': 'win32',
'sys_version': '2.7.5 |Anaconda 1.9.2 (64-bit)| (default, Jul 1 2013, 12:37:52) [MSC v.1500 64 bit (AMD64)]'}
Suspiciously, when I start an IPython console in the Kernel tab in the Console pane I see the following 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
To connect another client to this kernel, use:
--existing kernel-11532.json
Since this works in the IPython QtConsole would it be possible to get it working in Spyder as well?
As it is currently I'm doing a lot of IPython.parallel work where I need to be able to interrupt a parallel calculation (a loop, waiting on asynchronous results) and it's very annoying to lose my session if I want to do so.
Thanks,
Dave
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To post to this group, send email to spyd...@googlegroups.com.
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.
Hi Dave,
This is working for me with IPython 2.1.0. Are you using IPython master?
Cheers,
Carlos
Hi Dave,
This is working for me with IPython 2.1.0. Are you using IPython master?
Cheers,
Carlos
In [1]: from time import sleep
...: while True:
...: sleep(2)
...:
---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-1-0b0776baa1cf> in <module>()
1 from time import sleep
2 while True:
----> 3 sleep(2)
4
KeyboardInterrupt:
Restarting kernel...
In [1]: from time import sleep
...: while True:
...: sleep(2)
---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-1-96b4b67498f8> in <module>()
1 from time import sleep
2 while True:
----> 3 sleep(2)
KeyboardInterrupt:
In [1]:
Hi,
Very good catch! Please open an issue so we don't forget to address it. I'll try to fix for 2.3.1.
Cheers,
Carlos
El 17/06/14 07:18, Dave Hirschfeld escribió:
On Thursday, 12 June 2014 03:51:23 UTC+1, Carlos Córdoba wrote:Hi Dave,
This is working for me with IPython 2.1.0. Are you using IPython master?
Cheers,
Carlos
I've managed to reproduce it!
The trick is that it always works in a newly opened IPython console. It's only after you Restart the console that you lose the ability to break out of any loops with Ctrl-C.
I hit this problem because I'm always hitting Ctrl-. to restart my console as it's quicker and more convenient than opening a new console.
Note that this doesn't occur in the qtconsole for me.
Let me know if you can repro the problem!
Thanks,Dave