From 1bc04dfa7428f4193f39de0d863902b7d96bbb89 Mon Sep 17 00:00:00 2001 From: Tim Kersten Date: Tue, 11 Dec 2007 08:19:24 -0500 Subject: [PATCH] Handling specifying a non-existing file on the command line http://www.reinteract.org/trac/ticket/17 --- lib/reinteract/main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/reinteract/main.py b/lib/reinteract/main.py index 41aa792..d7ff5f8 100644 --- a/lib/reinteract/main.py +++ b/lib/reinteract/main.py @@ -118,9 +118,12 @@ def on_new(action): def load(filename): notebook.set_path([os.path.dirname(os.path.abspath(filename))]) - - buf.load(filename) - calculate() + if not os.path.exists(filename): + buf.filename = filename + update_title() + else: + buf.load(filename) + calculate() def on_open(action): if not confirm_discard('Discard unsaved changes to worksheet "%s"?', '_Discard'): -- 2.11.4.GIT