[IPython-User] BlockingKernelManager
matt.clarke@stfc....
matt.clarke@stfc....
Thu Mar 10 06:36:58 CST 2011
Hi.
I am playing with the BlockingKernelManager on Windows and it appears that the KernelManager does not stay alive for very long.
For example, if I run the following code:
import sys
import time
from IPython.zmq.blockingkernelmanager import BlockingKernelManager
from IPython.utils import io
def setup():
global KM
KM = BlockingKernelManager()
KM.start_kernel()
KM.start_channels()
print KM.is_alive
# Give the kernel a chance to come up.
time.sleep(1)
def teardown():
print KM.is_alive
io.rprint('Entering teardown...') # dbg
io.rprint('Stopping channels and kernel...') # dbg
KM.stop_channels()
KM.kill_kernel()
# Actual tests
def test_execute():
print KM.is_alive
KM.xreq_channel.execute(code='x=1')
KM.xreq_channel.execute(code='print 1')
setup()
test_execute()
time.sleep(1)
teardown()
The KM is alive in setup, but not in test_execute and teardown. Works fine on Linux.
Any ideas?
Matt
--
Scanned by iCritical.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20110310/f0943d13/attachment.html
More information about the IPython-User
mailing list