[IPython-user] how to kill embedded ipython

dima Q dimaqq@gmail....
Tue Jul 31 02:04:40 CDT 2007

I don't use win32 at present.

I decided to get around screwy terminal by running my program under screen
This works for me because I wanted to use IPython to monitor long-running
processes/daemons, thus I had screen in mind from the start.

On 7/30/07, Fernando Perez <fperez.net@gmail.com> wrote:
> On 7/30/07, dima Q <dimaqq@gmail.com> wrote:
> > Hi
> >
> > 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?
> Honestly I don't know.  I do know that readline is finicky with
> threads, because in the past there have been thread-related bugs in
> the core readline module (discovered by ipython users, in fact).
> Those bugs were fixed long ago, but I mention it because it means that
> readline and threads aren't necessarily a trivial mix.
> However, if you figure out a clean solution, by all means let us know,
> and even better, post it on the cookbook:
> http://ipython.scipy.org/moin/Cookbook
> I'm sure others would find the information useful.
> As Ville said, it's possible that under Win32 something better could
> be done, since we have full control over readline there.  But on POSIX
> where we ride on Python's readline, I just don't know, sorry.
> Cheers,
> f
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ipython.scipy.org/pipermail/ipython-user/attachments/20070731/d0f1b611/attachment.html 

More information about the IPython-user mailing list