[IPython-user] how to kill embedded ipython

Ville M. Vainio vivainio@gmail....
Mon Jul 30 11:01:01 CDT 2007


On 7/30/07, dima Q <dimaqq@gmail.com> wrote:

> I'm trying to add ipython to a program where interactive interface is a very
> small part - I use it mostly for debugging. I want to be able to add ipython
> in such a way that when the program decides to exit (due to gui action or
> network conditions), interactive interface exits too. I have ipython running
> in another thread.
>
> branch 1:
> I found a function shell.IP.exit(), and setting conirm_exit=False,
> however when I do these, ipython thread waits in readline()
> before actually exiting
>
> branch 2:
> I set threading.Thread.setDaemon (True) on the thread where I run ipython,
>  however when thread program exits terminal is left in a broken state by
> readline
>
> Any suggestions how I could implement what I want here?

If this is for win32, we could perhaps hack pyreadline to force the
exit from line input before enter in pressed.

Or not. Jorgen?

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'


More information about the IPython-user mailing list