From 6562ad5da1548247e50c2b592332c9f56afda072 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 24 Jan 2018 20:04:34 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cgi-bin/issuedb.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 cgi-bin/issuedb.py (limited to 'cgi-bin/issuedb.py') diff --git a/cgi-bin/issuedb.py b/cgi-bin/issuedb.py new file mode 100644 index 0000000..faa6bc6 --- /dev/null +++ b/cgi-bin/issuedb.py @@ -0,0 +1,14 @@ +import pymysql + +host = "localhost" +port = 3306 +user = "root" +passwd = "root" +db = "issues" + + +class IssueDBFactory(object): + def produce(): + issuedb = pymysql.connect(host, user, passwd, db) + return issuedb + -- cgit v1.1-26-g67d0