Spyder swallows Ctrl-C in IPython console

1,138 views
Skip to first unread message

Dave Hirschfeld

unread,
Oct 16, 2013, 3:52:19 AM10/16/13
to spyd...@googlegroups.com
I'm on the latest spyder and IPython.
In the qtconsole the following works:

In [1]: def f():

   ...:     import time

   ...:     while True:

   ...:     time.sleep(1)

   ...:


In [2]: f()

---------------------------------------------------------------------------

KeyboardInterrupt Traceback (most recent call last)

<ipython-input-2-0ec059b9bfe1> in <module>()

----> 1 f()


<ipython-input-1-3243a981a5cc> in f()

2 import time

3 while True:

----> 4 time.sleep(1)

5


KeyboardInterrupt:


In [3]: from IPython import sys_info; print sys_info()

{'codename': 'Work in Progress',

'commit_hash': '2cdbe39',

'commit_source': 'installation',

'default_encoding': 'cp1252',

'ipython_path': 'C:\\dev\\bin\\Anaconda\\lib\\site-packages\\IPython',

'ipython_version': '2.0.0-dev',

'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.7.0 (64-bit)| (default, Jul 1 2013, 12:37:52) [MSC v.1500 64 bit (AMD64)]'}



In the spyder IPython console I can't break out of the loop and I have to kill the session, potentially losing lots of work.

Is anyone else seeing this?

Regards,
Dave

Adrian Klaver

unread,
Oct 16, 2013, 9:36:33 AM10/16/13
to spyd...@googlegroups.com
On 10/16/2013 12:52 AM, Dave Hirschfeld wrote:
> I'm on the latest spyder and IPython.
> In the qtconsole the following works:
>

Will need to specifically define latest Spyder, there is both a 2.2,X
series and the development series 2.3.0x.

>
>
>
> In the spyder IPython console I can't break out of the loop and I have
> to kill the session, potentially losing lots of work.
>
> Is anyone else seeing this?

Ctrl+C works for me in Spyder 2.3.0dev6.

>
> Regards,
> Dave
>



--
Adrian Klaver
adrian...@gmail.com

Adrian Klaver

unread,
Oct 16, 2013, 9:51:09 AM10/16/13
to spyd...@googlegroups.com
On 10/16/2013 12:52 AM, Dave Hirschfeld wrote:
> I'm on the latest spyder and IPython.
> In the qtconsole the following works:

> In the spyder IPython console I can't break out of the loop and I have
> to kill the session, potentially losing lots of work.
>
> Is anyone else seeing this?

I forgot to mention previously that I am using IPython 1.1.0 on Linux.

Dave Hirschfeld

unread,
Oct 18, 2013, 5:53:44 AM10/18/13
to spyd...@googlegroups.com

On Wednesday, 16 October 2013 14:51:09 UTC+1, Adrian Klaver wrote:
On 10/16/2013 12:52 AM, Dave Hirschfeld wrote:
> I'm on the latest spyder and IPython.
> In the qtconsole the following works:

> In the spyder IPython console I can't break out of the loop and I have
> to kill the session, potentially losing lots of work.
>
> Is anyone else seeing this?

I forgot to mention previously that I am using IPython 1.1.0 on Linux.

Adrian Klaver
adrian...@gmail.com


Spyder Version:  2.3.0dev (3236+:r3a1f07eef385)

...however after a reboot I can no longer reproduce the problem I was seeing so I'll just put this one down to a windows error. Sorry for the noise.

-Dave

 

Carlos Córdoba

unread,
Oct 22, 2013, 12:16:54 AM10/22/13
to spyd...@googlegroups.com
Hi Dave,

If this problem shows up for you again, you could try to reduce the console's buffer size in

Preferences > IPython Console > Source Code > Buffer

to 500 lines (from the default, which is 10.000). The real problem is that the underlying Qt widget that powers the console can be blocked if it's trying to render too much text at once, and that blocks the entire application.

I'll change that default in 2.3.

Cheers,
Carlos

El 18/10/13 04:53, Dave Hirschfeld escribió:
--
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/groups/opt_out.

Dave Hirschfeld

unread,
Oct 22, 2013, 2:44:54 AM10/22/13
to spyd...@googlegroups.com

On Tuesday, 22 October 2013 05:16:54 UTC+1, Carlos Córdoba wrote:
Hi Dave,

If this problem shows up for you again, you could try to reduce the console's buffer size in

Preferences > IPython Console > Source Code > Buffer

to 500 lines (from the default, which is 10.000). The real problem is that the underlying Qt widget that powers the console can be blocked if it's trying to render too much text at once, and that blocks the entire application.

I'll change that default in 2.3.

Cheers,
Carlos

El 18/10/13 04:53, Dave Hirschfeld escribió:

On Wednesday, 16 October 2013 14:51:09 UTC+1, Adrian Klaver wrote:
On 10/16/2013 12:52 AM, Dave Hirschfeld wrote:
> I'm on the latest spyder and IPython.
> In the qtconsole the following works:

> In the spyder IPython console I can't break out of the loop and I have
> to kill the session, potentially losing lots of work.
>
> Is anyone else seeing this?


Spyder Version:  2.3.0dev (3236+:r3a1f07eef385)

...however after a reboot I can no longer reproduce the problem I was seeing so I'll just put this one down to a windows error. Sorry for the noise.

-Dave
Thanks for the explanation! I probably had kept spyder open for a few days so it's quite likely the buffer was full.

-Dave 
Reply all
Reply to author
Forward
0 new messages