[IPython-User] Using embedded IPython with gevent

Dave Foster dave.foster@gmail....
Wed Oct 26 10:13:41 CDT 2011


Hi all,
I had hoped to be able to use embedded IPython in my application for
work with gevent greenlets happily buzzing away in the background.  In
short, I'd expect something like this to work:

#!/usr/bin/ipython

from gevent import spawn, joinall
import time
import IPython

def work():
    while True:
        time.sleep(2)
        print "Hello"

gl = spawn(work)
IPython.embed()

(gist here: https://gist.github.com/1314849)

Anyone know if this is possible? Am I doin it wrong?

Any help appreciated, thanks.

dave


More information about the IPython-User mailing list