Revision: 4944
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4944&view=rev
Author:   pkienzle
Date:     2008-02-05 15:31:32 -0800 (Tue, 05 Feb 2008)

Log Message:
-----------
Put output from each backend in a separate directory

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

Modified: trunk/matplotlib/examples/backend_driver.py
===================================================================
--- trunk/matplotlib/examples/backend_driver.py 2008-02-05 23:17:34 UTC (rev 
4943)
+++ trunk/matplotlib/examples/backend_driver.py 2008-02-05 23:31:32 UTC (rev 
4944)
@@ -131,6 +131,16 @@
         _backend = 'cairo'
     else:
         _backend = backend
+
+    # Clear the destination directory for the examples
+    path = backend
+    if os.path.exists(path):
+        import glob
+        for fname in os.listdir(path):
+            os.unlink(os.path.join(path,fname))
+    else:
+        os.mkdir(backend)
+
     for fname in files:
         if fname in exclude:
             print '\tSkipping %s, known to fail on backend: %s'%backend
@@ -138,7 +148,7 @@
 
         print ('\tdriving %-40s' % (fname)),
         basename, ext = os.path.splitext(fname)
-        outfile = basename + '_%s'%backend
+        outfile = os.path.join(path,basename)
         tmpfile_name = '_tmp_%s.py' % basename
         tmpfile = file(tmpfile_name, 'w')
 


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