def __init__(self, read_only = True, auto_commit = False, timeout = 5, auto_connect = False, max_idle_time = 28800): '''Initialize the Mydb object.''' # Get the database parameters args = {'host':'127.0.0.1', 'user':'******','passwd':'xxxx','db':'goodcode','port':3306,'charset':'utf8'} # Set extra connection parameters args['connect_timeout'] = timeout args['auto_commit'] = auto_commit args['max_idle_time'] = max_idle_time args['auto_connect'] = auto_connect DB.__init__(self, **args)
def __init__(self, pos, DBPath=None): DB.__init__(self, DBPath) self.pos = pos
def __init__(self): DB.__init__(self)