From: <md...@us...> - 2007-07-16 18:29:24
|
Revision: 3544 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3544&view=rev Author: mdboom Date: 2007-07-16 11:29:23 -0700 (Mon, 16 Jul 2007) Log Message: ----------- Fix running unicode_demo.py from backend_driver.py. (The -*- coding line must appear before any non-comment lines). Modified Paths: -------------- trunk/matplotlib/examples/backend_driver.py Modified: trunk/matplotlib/examples/backend_driver.py =================================================================== --- trunk/matplotlib/examples/backend_driver.py 2007-07-16 18:06:54 UTC (rev 3543) +++ trunk/matplotlib/examples/backend_driver.py 2007-07-16 18:29:23 UTC (rev 3544) @@ -38,7 +38,7 @@ 'figtext.py', 'fill_demo.py', 'finance_demo.py', -# 'fonts_demo_kw.py', + 'fonts_demo_kw.py', 'histogram_demo.py', 'image_demo.py', 'image_demo2.py', @@ -125,6 +125,13 @@ tmpfile_name = '_tmp_%s.py' % basename tmpfile = file(tmpfile_name, 'w') + for line in file(fname): + line_lstrip = line.lstrip() + if line_lstrip.startswith("#"): + tmpfile.write(line) + else: + break + tmpfile.writelines(( 'from __future__ import division\n', 'import matplotlib\n', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2007-11-15 18:36:57
|
Revision: 4316 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4316&view=rev Author: mdboom Date: 2007-11-15 10:36:51 -0800 (Thu, 15 Nov 2007) Log Message: ----------- Have backend_driver report times for each individual test. Modified Paths: -------------- trunk/matplotlib/examples/backend_driver.py Modified: trunk/matplotlib/examples/backend_driver.py =================================================================== --- trunk/matplotlib/examples/backend_driver.py 2007-11-15 18:36:27 UTC (rev 4315) +++ trunk/matplotlib/examples/backend_driver.py 2007-11-15 18:36:51 UTC (rev 4316) @@ -123,9 +123,7 @@ os.system(' '.join(arglist)) def drive(backend, python=['python'], switches = []): - exclude = failbackend.get(backend, []) - switchstring = ' '.join(switches) # Strip off the format specifier, if any. if backend.startswith('cairo'): _backend = 'cairo' @@ -136,7 +134,7 @@ print '\tSkipping %s, known to fail on backend: %s'%backend continue - print '\tdriving %s %s' % (fname, switchstring) + print ('\tdriving %-40s' % (fname)), basename, ext = os.path.splitext(fname) outfile = basename + '_%s'%backend tmpfile_name = '_tmp_%s.py' % basename @@ -169,7 +167,10 @@ tmpfile.write('savefig("%s", dpi=150)' % outfile) tmpfile.close() + start_time = time.time() run(python + [tmpfile_name, switchstring]) + end_time = time.time() + print (end_time - start_time) #os.system('%s %s %s' % (python, tmpfile_name, switchstring)) os.remove(tmpfile_name) @@ -193,7 +194,8 @@ if not backends: backends = default_backends for backend in backends: - print 'testing %s' % backend + switchstring = ' '.join(switches) + print 'testing %s %s' % (backend, switchstring) t0 = time.time() drive(backend, python, switches) t1 = time.time() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pki...@us...> - 2008-02-05 23:31:34
|
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. |
From: <md...@us...> - 2008-02-19 21:32:51
|
Revision: 4982 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4982&view=rev Author: mdboom Date: 2008-02-19 13:32:48 -0800 (Tue, 19 Feb 2008) Log Message: ----------- Add valgrind memcheck support to backend_driver.py Modified Paths: -------------- trunk/matplotlib/examples/backend_driver.py Modified: trunk/matplotlib/examples/backend_driver.py =================================================================== --- trunk/matplotlib/examples/backend_driver.py 2008-02-19 19:41:53 UTC (rev 4981) +++ trunk/matplotlib/examples/backend_driver.py 2008-02-19 21:32:48 UTC (rev 4982) @@ -147,6 +147,7 @@ continue print ('\tdriving %-40s' % (fname)), + sys.stdout.flush() basename, ext = os.path.splitext(fname) outfile = os.path.join(path,basename) tmpfile_name = '_tmp_%s.py' % basename @@ -180,7 +181,8 @@ tmpfile.close() start_time = time.time() - run(python + [tmpfile_name, switchstring]) + program = [x % {'name': basename} for x in python] + run(program + [tmpfile_name, switchstring]) end_time = time.time() print (end_time - start_time) #os.system('%s %s %s' % (python, tmpfile_name, switchstring)) @@ -192,6 +194,10 @@ if '--coverage' in sys.argv: python = ['coverage.py', '-x'] sys.argv.remove('--coverage') + elif '--valgrind' in sys.argv: + python = ['valgrind', '--tool=memcheck', '--leak-check=yes', + '--log-file=%(name)s', 'python'] + sys.argv.remove('--valgrind') elif sys.platform == 'win32': python = [r'c:\Python24\python.exe'] else: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2008-04-22 18:55:46
|
Revision: 5062 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5062&view=rev Author: efiring Date: 2008-04-22 11:55:36 -0700 (Tue, 22 Apr 2008) Log Message: ----------- Restore ability of backend_driver.py to drive cairo.svg, etc. Modified Paths: -------------- trunk/matplotlib/examples/backend_driver.py Modified: trunk/matplotlib/examples/backend_driver.py =================================================================== --- trunk/matplotlib/examples/backend_driver.py 2008-04-22 15:09:24 UTC (rev 5061) +++ trunk/matplotlib/examples/backend_driver.py 2008-04-22 18:55:36 UTC (rev 5062) @@ -126,11 +126,6 @@ def drive(backend, python=['python'], switches = []): exclude = failbackend.get(backend, []) - # Strip off the format specifier, if any. - if backend.startswith('cairo'): - _backend = 'cairo' - else: - _backend = backend # Clear the destination directory for the examples path = backend @@ -163,7 +158,7 @@ tmpfile.writelines(( 'from __future__ import division\n', 'import matplotlib\n', - 'matplotlib.use("%s")\n' % _backend, + 'matplotlib.use("%s")\n' % backend, 'from pylab import savefig\n', )) for line in file(fname): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |