Revision: 8557
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8557&view=rev
Author:   efiring
Date:     2010-07-15 20:45:19 +0000 (Thu, 15 Jul 2010)

Log Message:
-----------
show for tkagg doesn't block in script called via ipython -pylab.
This is the first in an expected series of changes to show().

Modified Paths:
--------------
    branches/v1_0_maint/lib/matplotlib/backends/backend_tkagg.py

Modified: branches/v1_0_maint/lib/matplotlib/backends/backend_tkagg.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/backends/backend_tkagg.py        
2010-07-15 18:34:54 UTC (rev 8556)
+++ branches/v1_0_maint/lib/matplotlib/backends/backend_tkagg.py        
2010-07-15 20:45:19 UTC (rev 8557)
@@ -71,7 +71,13 @@
     """
     for manager in Gcf.get_all_fig_managers():
         manager.show()
-    Tk.mainloop()
+    try:
+        if not show._needmain: # might have been added by ipython
+            return
+    except AttributeError:
+        pass
+    if not matplotlib.is_interactive():
+        Tk.mainloop()
 
 def new_figure_manager(num, *args, **kwargs):
     """


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to