Created
February 25, 2013 15:35
-
-
Save tiomoreno/5030648 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import MySQLdb as Mysql | |
class MysqlFactory(): | |
"""factory de conexão com mysql""" | |
def getConnection(self, config): | |
connection = Mysql.connect(config["host"],config["user"],config["password"]) | |
connection.select_db(config["db"]) | |
return connection; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment