This is not a matplotlib problem but an issue with Python itself. Unlike for 
example Tcl/Tk, Python does not have support for event loops. Each of the 
graphics backends (Tkinter, PyGTK, PyQT, the Mac OS X native backend) therefore 
each implement an event loop on their own. In general, these will clash with 
each other. Even IDLE's event loop (IDLE uses Tkinter) does not play nice with 
Tkinter itself: import Tkinter; Tkinter.Tk() opens a Tk window when run from 
the console, but does nothing when run from IDLE. Until Python itself supports 
event loops, I doubt that these problems will go away. I believe that ipython 
has made some progress in addressing these issues, but that of course won't 
help people who use regular python instead of ipython.

--Michiel.

--- On Fri, 2/5/10, David MacQuigg <macqu...@ece.arizona.edu> wrote:

> From: David MacQuigg <macqu...@ece.arizona.edu>
> Subject: [Matplotlib-users]  Matplotlib conflicts with IDLE
> To: matplotlib-users@lists.sourceforge.net
> Date: Friday, February 5, 2010, 3:46 PM
> 
> I can't get Matplotlib to work with IDLE.  plt.show()
> makes beutiful plots,
> but IDLE is hung.  Entering "exit" in the little
> pop-up console window
> raises an exception in IDLE, and then leaves the plot
> window hung. It looks
> like the old "dualing event loops" problem with IDLE,
> although the
> Matplotlib docs don't use that phrase.
> 
> The way I ususally solve this is to use IDLE for editing my
> scripts, and a
> separate shell to actually run them.  Here, I'm not
> using a saved script. 
> This needs to work interactively, for students using Python
> in a physics
> class.  I see that little console window, and it sure
> looks like that was
> intended to do what I need, but I can't find any
> documentation on the
> commands.  How do I switch back and forth between IDLE
> and the plot window
> without leaving some process in limbo?  Even better,
> is there an option to
> have the event loop automatically switch back to IDLE after
> each update?
> 
> I'm running on Mac OS-X, so it looks like IPython is not an
> option.  Also, I
> would rather stick with IDLE.  It is the perfect IDE
> for non-CS students who
> shouldn't be spending their time on the complexities of a
> plotting package.
> 
> -- 
> View this message in context: 
> http://old.nabble.com/Matplotlib-conflicts-with-IDLE-tp27473693p27473693.html
> Sent from the matplotlib - users mailing list archive at
> Nabble.com.
> 
> 
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage,
> colocation
> Stay online with enterprise data centers and the best
> network in the business
> Choose flexible plans and management services without
> long-term contracts
> Personal 24x7 support from experience hosting pros just a
> phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 


      

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to