diff options
author | Lei Yan | 2014-01-31 16:12:36 -0600 |
---|---|---|
committer | Lei Yan | 2014-01-31 16:12:36 -0600 |
commit | d6543befcdaf4786f42c10c1cdd0cb473a8d8453 (patch) | |
tree | 41170e9f8a2bc81734760493500474fb33e71156 /wqflask/maintenance/dataset/utilities | |
parent | 4a3c48c4b91c0cce9d7d0e9896be893d6e80a883 (diff) | |
download | genenetwork2-d6543befcdaf4786f42c10c1cdd0cb473a8d8453.tar.gz |
On branch master
Diffstat (limited to 'wqflask/maintenance/dataset/utilities')
-rw-r--r-- | wqflask/maintenance/dataset/utilities/__init__.py | 0 | ||||
-rw-r--r-- | wqflask/maintenance/dataset/utilities/db.py | 10 | ||||
-rw-r--r-- | wqflask/maintenance/dataset/utilities/test.py | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/wqflask/maintenance/dataset/utilities/__init__.py b/wqflask/maintenance/dataset/utilities/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/wqflask/maintenance/dataset/utilities/__init__.py diff --git a/wqflask/maintenance/dataset/utilities/db.py b/wqflask/maintenance/dataset/utilities/db.py new file mode 100644 index 00000000..453ee707 --- /dev/null +++ b/wqflask/maintenance/dataset/utilities/db.py @@ -0,0 +1,10 @@ +import MySQLdb + +def get_cursor(): + host = 'localhost' + user = 'webqtl' + passwd = 'webqtl' + db = 'db_webqtl' + con = MySQLdb.Connect(db=db, host=host, user=user, passwd=passwd) + cursor = con.cursor() + return cursor
\ No newline at end of file diff --git a/wqflask/maintenance/dataset/utilities/test.py b/wqflask/maintenance/dataset/utilities/test.py new file mode 100644 index 00000000..340377b3 --- /dev/null +++ b/wqflask/maintenance/dataset/utilities/test.py @@ -0,0 +1,3 @@ +import db + +print db.get_cursor()
\ No newline at end of file |