[SciPy-dev] gui_thread issue

eric jones eric at enthought.com
Sun Nov 7 22:11:48 CST 2004


>
> One more thing.  Now that I have the necessary "readline" module in my 
> site-packages to make ipython colorize correctly, Ctrl-Z no longer 
> works to exit a standard python shell or ipython.  Has anyone else had 
> similar problems?  Ctrl-C sometimes exits ipython, sometimes not.  I 
> use "import sys;sys.exit()" to exit standard python prompts.
>
I was a little off here.  Ctrl-Z doesn't work with either ipython.py or 
the standard python shell.

In ipython, Ctrl-C generates a keyboard interrupt in ipython.py *unless* 
I have imported gui_thread and started it.  Then it kills the session. 

Here is an example of what I get:

C:\wrk\converge\src\lib\enthought\tvtk\examples>ipython.py
Python 2.3.3 (#51, Feb 16 2004, 04:07:52) [MSC v.1200 32 bit (Intel)]
<snip>
In [1]: <Ctrl-C>
KeyboardInterrupt
In [1]: import gui_thread
In [2]: <Ctrl-C>
KeyboardInterrupt
In [2]: gui_thread.start()\
In [3]: <Ctril-C>
C:\wrk\converge\src\lib\enthought\tvtk\examples>

So, it looks like gui_thread changes the way <Ctrl-C> behaves.  Anyone 
know of a fix for this (and the Ctrl-Z issue)?

eric




More information about the Scipy-dev mailing list