Revision: 5184
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5184&view=rev
Author:   jdh2358
Date:     2008-05-17 14:54:14 -0700 (Sat, 17 May 2008)

Log Message:
-----------
fixed backend driver cleanup

Modified Paths:
--------------
    trunk/matplotlib/examples/tests/backend_driver.py

Modified: trunk/matplotlib/examples/tests/backend_driver.py
===================================================================
--- trunk/matplotlib/examples/tests/backend_driver.py   2008-05-17 21:47:40 UTC 
(rev 5183)
+++ trunk/matplotlib/examples/tests/backend_driver.py   2008-05-17 21:54:14 UTC 
(rev 5184)
@@ -16,7 +16,7 @@
 """
 
 from __future__ import division
-import os, time, sys
+import os, time, sys, glob
 import matplotlib.backends as mplbe
 
 pylab_dir = os.path.join('..', 'pylab')
@@ -203,10 +203,15 @@
     times = {}
     default_backends = ['Agg', 'PS', 'SVG', 'PDF', 'Template']
     if len(sys.argv)==2 and sys.argv[1]=='--clean':
-        for b in default_backends:
-            # todo: implement python recursive remove
-            print 'executing: %s'%command
-            os.system(command)
+        localdirs = [d for d in glob.glob('*') if os.path.isdir(d)]
+        backends_lower = set([b.lower() for b in default_backends])
+        for d in localdirs:
+            if d.lower() in backends_lower:
+                command = 'rm -rf %s'%d
+                # todo: implement python recursive remove
+                print 'executing: %s'%command
+                os.system(command)
+        os.system('rm -rf _tmp*.py')
         print 'all clean...'
         raise SystemExit
     if '--coverage' in sys.argv:


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: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to