diff --git a/docs/source/development/ipython_qt.txt b/docs/source/development/ipython_qt.txt index a8b13d0..a6abbff 100644 --- a/docs/source/development/ipython_qt.txt +++ b/docs/source/development/ipython_qt.txt @@ -22,46 +22,24 @@ This GUI will allow for the easy editing of multi-line input and the convenient ++++++++++++++++++++++++++ Since the necessity of a user to keep his data safe, the design is based in a 2-process model that will be achieved with a simple client/server system with `pyzmq `_, so the GUI session do not crash if the the kernel process does. This will be achieved using this test `code `_ and customizing it to the necessities of the GUI such as queue management with discrimination for different frontends connected to the same kernel and tab completion. A piece of drafted code for the kernel (server) should look like this: - - -*def main():* - - *c = zmq.Context(1, 1)* - - *rep_conn = connection % port_base* - - *pub_conn = connection % (port_base+1)* - - *print >>sys.__stdout__, "Starting the kernel..."* - - *print >>sys.__stdout__, "On:",rep_conn, pub_conn* - - *session = Session(username=u'kernel')* - - *reply_socket = c.socket(zmq.XREP)* - - *reply_socket.bind(rep_conn)* - - *pub_socket = c.socket(zmq.PUB)* - - *pub_socket.bind(pub_conn)* - - *stdout = OutStream(session, pub_socket, u'stdout')* - - *stderr = OutStream(session, pub_socket, u'stderr')* - - *sys.stdout = stdout* - - *sys.stderr = stderr* - - *display_hook = DisplayHook(session, pub_socket)* - - *sys.displayhook = display_hook* - - *kernel = Kernel(session, reply_socket, pub_socket)* - - - + def main(): + c = zmq.Context(1, 1) + rep_conn = connection % port_base + pub_conn = connection % (port_base+1) + print >>sys.__stdout__, "Starting the kernel..." + print >>sys.__stdout__, "On:",rep_conn, pub_conn + session = Session(username=u'kernel') + reply_socket = c.socket(zmq.XREP) + reply_socket.bind(rep_conn) + pub_socket = c.socket(zmq.PUB) + pub_socket.bind(pub_conn) + stdout = OutStream(session, pub_socket, u'stdout') + stderr = OutStream(session, pub_socket, u'stderr') + sys.stdout = stdout + sys.stderr = stderr + display_hook = DisplayHook(session, pub_socket) + sys.displayhook = display_hook + kernel = Kernel(session, reply_socket, pub_socket) Qt based GUI ++++++++++++