From f04f26276cf854e943a449513559ae60dfa2d128 Mon Sep 17 00:00:00 2001 From: oysteini Date: Sun, 6 Mar 2011 11:40:57 +0000 Subject: [PATCH] =?UTF-8?q?Endret=20navnet=20p=C3=A5=20open=5Ffile=20til?= =?UTF-8?q?=20run=5Feditor.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fjernet dessuten lesing av filen, slik at funksjonen gjør kun én ting (kjøre editor). Lese filen kan man gjøre etterpå. --- python/worblehat.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/worblehat.py b/python/worblehat.py index c362133..e56800e 100755 --- a/python/worblehat.py +++ b/python/worblehat.py @@ -196,14 +196,12 @@ def combine_dicts(*dicts): res.update(d) return res -def open_file(filename): +def run_editor(filename): if os.path.exists(filename): os.system("%s %s || /usr/bin/env vi %s" %(os.getenv("EDITOR"), filename, filename)) else: exit("Error: %s: File does not exist!" % filename) - return open(filename, 'r').readlines() - cmdline_parsed = parse_cmdline(sys.argv[1:])