On Wed, Apr 29, 2009 at 8:29 AM, John Hunter <jdh2...@gmail.com> wrote: > > > On Wed, Apr 29, 2009 at 9:07 AM, keflavich <keflav...@gmail.com> wrote: >> >> Since there don't seem to be any forthcoming answers, I have a somewhat >> different question. In the matplotlib FAQ, it states that using 'show()' >> puts you in the GUI mainloop >> (http://matplotlib.sourceforge.net/faq/howto_faq.html#use-show). However, >> using plot commands on the ipython command line does not shut down the >> command line generally. I gathered from some googling that this is >> because >> ipython starts up the matplotlib graphics in a different 'thread', but I >> don't understand how this is done and most of what I've seen says it is >> bad. > > most GUI mainloops are blocking, so after you start them you cannot issue > more commands from an interactive shell. Either you need to run a GUI > shell, or in the case of ipython run the GUI in a separate thread. One > exception to this is tkinter (tkagg), which plays nicely with a standard > python shell. I understand that recent versions of pygtk work also w/o > running the mainloop in a separate thread, but I haven't dug into the > details.
OK, that's very helpful. >> So, my question now: How can I exit the GUI mainloop without closing the >> graphics windows? > > This question doesn't really make sense to me. Perhaps you can clearly > describe your use case (what you need to do) rather than the proposed > solutions. I would like to have access to the command line while simultaneously being able to interact with and/or display plots. I think this is what ipython does by default when you pass it a thread keyword (-pylab, -qt4thread, etc.). I had some trouble getting ipython to work correctly, but I think that had to do with passing the thread keyword before/after some other keywords. Part of my question that I hope makes sense: Is there a way to unblock the command line without closing the plot window when using an interactive backend? Thanks, and sorry about the misunderstandings / lack of clarity, Adam ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users