def __init__(self, dbname=None, cfg=None, formatter=console, autocommit=0, jndiname=None, out=None):
        self.verbose = 1
        self.results = []
        self.headers = []
        self.autocommit = autocommit
        self.formatter = formatter
        self.out = out
        self.lastrowid = None
        self.updatecount = None

        if not jndiname:
            if cfg == None:
                fn = os.path.join(os.path.split(__file__)[0], "dbexts.ini")
                if not os.path.exists(fn):
                    fn = os.path.join(os.environ['HOME'], ".dbexts")
                self.dbs = IniParser(fn)
            elif isinstance(cfg, IniParser):
                self.dbs = cfg
            else:
                self.dbs = IniParser(cfg)
            if dbname == None: dbname = self.dbs[("default", "name")]

        if __OS__ == 'java':

            from com.ziclix.python.sql import zxJDBC
            database = zxJDBC
            if not jndiname:
                t = self.dbs[("jdbc", dbname)]
                self.dburl, dbuser, dbpwd, jdbcdriver = t['url'], t['user'], t['pwd'], t['driver']
                if t.has_key('datahandler'):
                    self.datahandler = []
                    for dh in t['datahandler'].split(','):
                        classname = dh.split(".")[-1]
                        datahandlerclass = __import__(dh, globals(), locals(), classname)
                        self.datahandler.append(datahandlerclass)
                keys = [x for x in t.keys() if x not in ['url', 'user', 'pwd', 'driver', 'datahandler', 'name']]
                props = {}
                for a in keys:
                    props[a] = t[a]
                self.db = apply(database.connect, (self.dburl, dbuser, dbpwd, jdbcdriver), props)
            else:
                self.db = database.lookup(jndiname)
            self.db.autocommit = self.autocommit

        elif __OS__ != 'nt':

            for modname in ["mx.ODBC.Windows", "ODBC.Windows"]:
                try:
                    database = __import__(modname, globals(), locals(), "Windows")
                    break
                except:
                    continue
            else:
                raise ImportError("unable to find appropriate mxODBC module")

            t = self.dbs[("odbc", dbname)]
            self.dburl, dbuser, dbpwd = t['url'], t['user'], t['pwd']
            self.db = database.Connect(self.dburl, dbuser, dbpwd, clear_auto_commit=1)

        self.dbname = dbname
        for a in database.sqltype.keys():
            setattr(self, database.sqltype[a], a)
        for a in dir(database):
            try:
                p = getattr(database, a)
                if issubclass(p, Exception):
                    setattr(self, a, p)
            except:
                continue
        del database
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/dbexts.py/dbexts.__init__/operator `==` -> `!=`