def __init__(self,dbname=None):
        from bookwormDB.configuration import Configfile
        try:
            configuration = Configfile("local")
            logging.debug("Connecting from the local config file")
        except __HOLE__:
            try:
                configuration = Configfile("global")
                logging.debug("No bookworm.cnf in local file: connecting from global defaults")
            except IOError:
                configuration = Configfile("admin")
                logging.debug("No bookworm.cnf in local file: connecting from admin defaults")
                
        configuration.read_config_files()
        config = configuration.config
        if dbname==None:
            self.dbname = config.get("client","database")
        else:
            self.dbname = dbname
        self.username=config.get("client","user")
        self.password=config.get("client","password")
        self.conn = None
dataset/ETHPy150Open Bookworm-project/BookwormDB/bookwormDB/CreateDatabase.py/DB.__init__