[IPython-User] BlockingKernelManager

Brian Granger ellisonbg@gmail....
Thu Mar 10 12:03:18 CST 2011


The BlockingKernelManager is only barely started and doesn't actually
work.  Contribution are welcome!

Cheers,

Brian

On Thu, Mar 10, 2011 at 4:36 AM,  <matt.clarke@stfc.ac.uk> wrote:
> 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.
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>



-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu
ellisonbg@gmail.com


More information about the IPython-User mailing list