diff options
Diffstat (limited to 'wqflask/maintenance/dataset')
-rw-r--r-- | wqflask/maintenance/dataset/load_phenotypes.py | 12 | ||||
-rw-r--r-- | wqflask/maintenance/dataset/utilities.py | 6 |
2 files changed, 18 insertions, 0 deletions
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 |