aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance
diff options
context:
space:
mode:
authorLei Yan2014-02-19 12:25:09 -0600
committerLei Yan2014-02-19 12:25:09 -0600
commit0c9940044586befb1b90524fea26c4cf4da7d6e6 (patch)
treebc17b2f1189879f5b92bf0764b4b7864a26610be /wqflask/maintenance
parente9a7f6c8b35f0eec909757c281e58681567ed274 (diff)
downloadgenenetwork2-0c9940044586befb1b90524fea26c4cf4da7d6e6.tar.gz
On branch master
Diffstat (limited to 'wqflask/maintenance')
-rw-r--r--wqflask/maintenance/dataset/load_phenotypes.py12
-rw-r--r--wqflask/maintenance/dataset/utilities.py6
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