[IPython-User] Using embedded IPython with gevent
Wed Oct 26 11:12:44 CDT 2011
As I understand it gevent is about pseudo-threads, not threads, so you have
to be running the gevent eventloop. Greenlets do not run in the
That would mean that you have to integrate IPython with the greenlet
eventloop, as we do currently with various GUI eventloops via code in
I find replacing IPython.embed() with time.sleep(10), which is perfectly
equivalent as far as the greenlets are concerned, also prevents the greenlet
firing, so I presume there is some eventloop that must be called.
On Wed, Oct 26, 2011 at 08:47, Thomas Kluyver <firstname.lastname@example.org> wrote:
> On 26 October 2011 16:27, Dave Foster <email@example.com> wrote:
>> No, no errors, IPython seems to be running just fine. What I'm missing
>> is the "worker" greenlet actually running. I was hoping that while I'm
>> in the shell, it would still run the greenlet and spit out the string
>> without me having to explicitly yield control back to the hub.
> I'm not familiar with gevent, but I wonder if it is actually running, but
> unable to write to stdout for whatever reason. I can't think that IPython
> should be interfering with it. Have you tried with a worker loop writing a
> file or something?
> a = 0
> while True:
> with open("test","w") as f:
> a += 1
> IPython-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User