From cf75a0c9d6167626e83bf78021dcb0ab067fb77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=2E=20Brandenburg?= Date: Thu, 10 Jun 2010 21:16:21 -0400 Subject: Add --prefix option. --- plot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plot.py') diff --git a/plot.py b/plot.py index f225372..8ac3838 100755 --- a/plot.py +++ b/plot.py @@ -14,7 +14,7 @@ options = [ o('-f', '--format', action='store', dest='format', type='choice', choices=FORMATS, help='output format'), o(None, '--save-script', action='store_true', dest='save_script'), - + o('-p', '--prefix', action='store', dest='prefix'), o('-e', '--experiment', action='store', dest='experiment', help="override auto-detection of experiment"), @@ -33,6 +33,7 @@ defaults = { 'format' : 'show', 'experiment' : None, 'save_script' : False, + 'prefix' : '', # formatting options 'paper' : False, @@ -246,7 +247,7 @@ class SchedPlotter(defapp.App): def make_plot(self, fname=None): p = Plot() - p.output = "%s.%s" % (fname, self.options.format) + p.output = "%s%s.%s" % (self.options.prefix, fname, self.options.format) p.format = self.options.format return p -- cgit v1.2.2