[IPython-dev] Embedding IPython+zmq
ROsborn at anl.gov
Thu Apr 12 12:44:15 EDT 2012
I didn't want to hijack the other thread so I thought I would create a new one. I just read the page that Jason Grout references about making the two-process iPython standard. I have, I think successfully, adapted Robert Kern's method of creating a kernel that fakes zmq messages within a single process, so that I can embed the iPython shell in a Qt GUI. I need this because I want to display items in the iPython shell namespace in a separate widget and need to trigger Qt signals when certain items in the namespace are changed. As Robert admits, this requires hacking into the zmq code and is probably not as elegant as it could be.
Are there plans to refactor the two-process code to enable a single-process mode easily? Or perhaps zmq messaging could be used to facilitate communication to external GUI widgets, such as providing a way of mapping messages to signals? This is not my area of expertise, so let me know if I have not explained the problem clearly enough.
Begin forwarded message:
> From: Jason Grout <jason-sage at creativetrax.com>
> Subject: Re: [IPython-dev] IPython+zmq and fork()
> Date: April 12, 2012 10:01:25 AM CDT
> To: ipython-dev at scipy.org
> Reply-To: IPython developers list <ipython-dev at scipy.org>
> On 4/12/12 9:43 AM, Volker Braun wrote:
>> Sage is getting ready to upgrade to the new IPython, excuses for any email
>> deluge on this list. One question that I have is whether you thought about
>> fork() to quickly spawn children (this is crucial for Sage since starting up
>> a new Sage process is quite slow). According to the zeromq mailinglist, you
>> shouldn't fork after creating a zmq context. This is not just a theoretical
>> problem, I wrote a clustering tool for my own purposes and found out the
>> hard way that bad things can happen if you do.
>> Will IPython always be usable without zmq? You are not planning to
>> eventually deprecate the non-zmq console client? Or maybe you have some
>> awesome other solution?
> Just as a point of reference, this documentation page (which seems to be
> outdated, maybe?) indicates that a single-user command line session will
> eventually use a 2-process model with zmq to communicate between the
> IPython-dev mailing list
> IPython-dev at scipy.org
Materials Science Division
Argonne National Laboratory
Argonne, IL 60439, USA
Phone: +1 (630) 252-9011
Email: ROsborn at anl.gov
More information about the IPython-dev