From: Stephen Soltesz <soltesz@cs.princeton.edu> Date: Tue, 11 Dec 2007 22:46:14 +0000 (+0000) Subject: add a global version of getListFromFile() X-Git-Tag: Monitor-1.0-0~15 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=cc22cc5b2b7e066f5324890ad80a7cba3654a5e5;p=monitor.git add a global version of getListFromFile() --- diff --git a/config.py b/config.py index a3032c0..906c447 100644 --- a/config.py +++ b/config.py @@ -23,6 +23,14 @@ def parse_bool(option, opt_str, value, parser): else: print "blue" +def getListFromFile(file): + f = open(file, 'r') + list = [] + for line in f: + line = line.strip() + list += [line] + return list + class config: debug=0 mail=0