Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

ZeroMQ-based interactive Python kernel (aka toy-ipython)

branch: master

Initial commit: zeromq-based interactive python kernel/frontend example.

This is a toy prototype that demonstrates the zeromq-based two-process
architecture used by IPython.  In fact, this was the code that
originated IPython's current implementation, kept here as a useful
standalone example with no dependencies beyond Python itself and pyzmq.
latest commit 88b708437e
Fernando Perez authored April 03, 2011
Octocat-spinner-32 README.rst Initial commit: zeromq-based interactive python kernel/frontend example. January 08, 2012
Octocat-spinner-32 completer.py Initial commit: zeromq-based interactive python kernel/frontend example. January 08, 2012
Octocat-spinner-32 frontend.py Initial commit: zeromq-based interactive python kernel/frontend example. January 08, 2012
Octocat-spinner-32 kernel.py Initial commit: zeromq-based interactive python kernel/frontend example. January 08, 2012
Octocat-spinner-32 message_spec.rst Initial commit: zeromq-based interactive python kernel/frontend example. January 08, 2012
Octocat-spinner-32 session.py Initial commit: zeromq-based interactive python kernel/frontend example. January 08, 2012
README.rst

Simple interactive Python kernel/frontend with ZeroMQ

This is the code that served as the original prototype for today's IPython client/server model. It is kept here purely as a reference to illustrate how to implement similar ideas for interactive Python interpreters on top of zeromq. This example used to be included with pyzmq but for some reason was removed, so it's available here in standalone form. It should be useful to anyone wishing to either implement a similar system or understand IPython's basic architecture without all of the details.

The message spec included here was the original, minimal spec we used for this implementation, today's IPython messaging is based on these ideas but has evolved substantially.

Usage

Run in one terminal:

./kernel.py

and in another:

./frontend.py

In the latter, you can type python code, tab-complete, etc. The kernel terminal prints all messages for debugging. Exit the frontend with Ctrl-D, and the kernel with Ctrl-(note that Ctrl-C will not stop the kernel).

License

This code is released under the terms of the BSD license, same as IPython itself. It was originally authored by Brian Granger and Fernando Perez, but no further development is planned, as all the ideas illustrated here are now implemented in IPython and developed there as production code.

Something went wrong with that request. Please try again.