def __init__(self, abs_dir): db = '%s/pylexitron/lexitron.db' % abs_dir os.stat(db) sqlite.enable_shared_cache(True) self.con = sqlite.connect(db) self.con.row_factory = sqlite.Row
from pysqlite2 import dbapi2 as sqlite3 # The shared cache is only available in SQLite versions 3.3.3 or later # See the SQLite documentaton for details. sqlite3.enable_shared_cache(True)