From 6144601259a8f8f99ef37fd2dfc580d714396425 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Sun, 16 Oct 2011 13:52:27 -0400 Subject: [PATCH] Add --nopause option for batch with preview --- main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 3fc0126..efd0a57 100644 --- a/main.py +++ b/main.py @@ -176,8 +176,11 @@ def main(args): def poll(dt): out = next(frames, False) if out is False: - label.text = "Done. ('q' to quit)" - pyglet.clock.unschedule(poll) + if args.nopause: + pyglet.app.exit() + else: + label.text = "Done. ('q' to quit)" + pyglet.clock.unschedule(poll) elif out is not None: real_dt = time.time() - last_time[0] last_time[0] = time.time() @@ -219,6 +222,8 @@ if __name__ == "__main__": help="Do not render any frame for which a .png already exists.") parser.add_argument('--raw', action='store_true', dest='raw', help="Do not write files; instead, send raw RGBA data to stdout.") + parser.add_argument('--nopause', action='store_true', + help="Don't pause after rendering when preview is up") seq = parser.add_argument_group('Sequence options', description=""" Control which frames are rendered from a genome sequence. If '-k' is