Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: cp1252 -*-
- class Conexao(object):
- __hostname = None
- __username = None
- __password = None
- __dbname = None
- __cursor = None
- __conexao = None
- def __init__(self):
- self.conectar()
- def __del__(self):
- self.desconectar()
- def setHostname(self, hostname):
- self.__hostname = hostname
- def setUsername(self, username):
- self.__username = username
- def setPassword(self, password):
- self.__password = password
- def setDbname(self, dbname):
- self.__dbname = dbname
- def setCursor(self, cursor):
- self.__cursor = cursor
- def setConexao(self, conexao):
- self.conexao = conexao
- def setAutoCommit(self, autocommit):
- self.conexao.autocommit = autocommit
- def getHostname(self):
- return self.__hostname
- def getUsername(self):
- return self.__username
- def getPassword(self):
- return self.__password
- def getDbname(self):
- return self.__dbname
- def getCursor(self):
- return self.__cursor
- def getConexao(self):
- return self.conexao
- def getAutoCommit(self):
- return self.conexao.autocommit
Add Comment
Please, Sign In to add comment