'>>> lock = SQLiteLockFile(\'somefile\')
>>> lock = SQLiteLockFile(\'somefile\', threaded=False)'

def __init__(self, path, threaded=True, timeout=None):

    LockBase.__init__(self, path, threaded, timeout)
    self.lock_file = unicode(self.lock_file)
    self.unique_name = unicode(self.unique_name)
    if (SQLiteLockFile.testdb is None):
        import tempfile
        (_fd, testdb) = tempfile.mkstemp()
        os.close(_fd)
        os.unlink(testdb)
        del _fd, tempfile
        SQLiteLockFile.testdb = testdb
    import sqlite3
    self.connection = sqlite3.connect(SQLiteLockFile.testdb)
    c = self.connection.cursor()
    try:
        c.execute('create    table    locks(            lock_file    varchar(32),            unique_name    varchar(32))')
    except sqlite3.OperationalError:
        pass
    else:
        self.connection.commit()
        import atexit
        atexit.register(os.unlink, SQLiteLockFile.testdb)
