From 0c9940044586befb1b90524fea26c4cf4da7d6e6 Mon Sep 17 00:00:00 2001 From: Lei Yan Date: Wed, 19 Feb 2014 12:25:09 -0600 Subject: On branch master --- wqflask/maintenance/dataset/load_phenotypes.py | 12 ++++++++++++ wqflask/maintenance/dataset/utilities.py | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 wqflask/maintenance/dataset/load_phenotypes.py (limited to 'wqflask') diff --git a/wqflask/maintenance/dataset/load_phenotypes.py b/wqflask/maintenance/dataset/load_phenotypes.py new file mode 100644 index 00000000..76314b2e --- /dev/null +++ b/wqflask/maintenance/dataset/load_phenotypes.py @@ -0,0 +1,12 @@ +import sys + +import utilities + +def main(argv): + config = utilities.get_config(argv[1]) + print config.items('') + +if __name__ == "__main__": + print "command line arguments: %s" % sys.argv + main(sys.argv) + print "exit successfully" diff --git a/wqflask/maintenance/dataset/utilities.py b/wqflask/maintenance/dataset/utilities.py index 04ca0438..63a3e84d 100644 --- a/wqflask/maintenance/dataset/utilities.py +++ b/wqflask/maintenance/dataset/utilities.py @@ -1,5 +1,6 @@ import MySQLdb import re +import ConfigParser def get_cursor(): host = 'localhost' @@ -39,3 +40,8 @@ def overlap(dic1, dic2): values1.append(value1) values2.append(value2) return keys, values1, values2 + +def get_config(configfile): + config = ConfigParser.ConfigParser() + config.read(configfile) + return config -- cgit v1.2.3