[IPython-dev] ipython in a background thread
Zachary Pincus
zachary.pincus at yale.edu
Tue May 3 07:36:59 EDT 2011
> I would check out the multiprocess Qt GUI that we have in master now.
I was looking at that -- unless I'm wrong, that throws up a window and emulates a terminal (or rather, runs ipython) inside of it? I was hoping to avoid that sort of approach, actually, and use a dedicated terminal emulator. However, if folks with more experience with this sort of thing than I have decided that the latter approach really isn't workable, I suppose the former will have to do.
Zach
> Cheers,
>
> Brian
>
> On Fri, Apr 29, 2011 at 10:03 AM, Zachary Pincus
> <zachary.pincus at yale.edu> wrote:
>> Hello all,
>>
>> I find that ipython, specifically ipython running in a good terminal (as opposed to embedded in a GUI window), provides a really great interface (e.g. in my case, a microscope and camera hardware). Given this use, it's been important to also have a GUI thread running so I can throw acquired images rapidly up onto a GL canvas or something. For a while, I've used a hacked-up pyglet runloop that would work in a background thread, and set up a simple message-passing system.
>>
>> This got quite kluged quite fast though, and it turns out this approach won't work at all with cocoa GUIs on OS X, which seem to require running on thread-0 (a pity). I know people on this list have looked and thought about these issues a lot, so I'd be curious what seems like the best approach in general? (There used to be some code in IPython for doing this with various window toolkits, but I don't see that in the 0.10.2's codebase anymore...)
>>
>> - I could run the GUI from thread-0 and try message-passing to IPython on another thread. Does this work well at all, or is it a huge kluge to get all the readline etc. features working right?
>>
>> - I could run the GUI in a separate process entirely, which would force a much cleaner API, but I'm not sure if pumping images at video-rate could be done cleanly. Maybe with shared memmapped arrays? (I've seen some recipes for this sort of thing on the numpy list lately.)
>>
>> - Any other possibilities or thoughts?
>>
>> Thanks a lot,
>> Zach
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>
>
>
> --
> Brian E. Granger
> Cal Poly State University, San Luis Obispo
> bgranger at calpoly.edu and ellisonbg at gmail.com
More information about the IPython-dev
mailing list