[IPython-dev] XREQ/XREP socets

Brian Granger ellisonbg@gmail....
Mon Aug 29 17:27:46 CDT 2011

IPython uses PyZMQ/ZeroMQ for its sockets, so you will need to
download them here:




On Mon, Aug 29, 2011 at 11:18 AM, Sean Ross-Ross <srossross@gmail.com> wrote:
> Hello, I've been playing around with the new socketed API and I have a few
> questions.
> My end goal is to create a simple javascript server. But for now I'm trying
> to see if I understand how the sockets work.
> In my testing I start an ipython kernel:
> $ ipython qtconsole
> [IPKernelApp] To connect another client to this kernel, use:
> [IPKernelApp] --existing --shell=49785 --iopub=49786 --stdin=49787
> --hb=49788
> Then, in another terminal I try to send a command manually to the shell
> socket (using python):
> import socket
> import json
> shell_sock = socket.create_connection(('localhost',49785))
> header = { 'msg_id' : 'uuid-123', 'username': 'sean', 'session': '??',
> 'msg_type': 'connect_request', }
> msg = dict(parent_header=parent_header, header=header, content=content)
> msg_str = json.dumps(msg)
> shell_sock.send(msg_str)
> shell_sock.recv(1024**2)
> This does not work, and I do not get any response. Why? I would use zmq but
> the server is implemented in javascript.  I also can not use ajax or jquery
> from the client-side html notebook app because this is on the server side.
> Thanks in advance.
> ~Sean
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com

More information about the IPython-dev mailing list