def __init__(self, path, threaded=True, timeout=None):
LockBase.__init__(self, path, threaded, timeout)<EOL>self.lock_file = unicode(self.lock_file)<EOL>self.unique_name = unicode(self.unique_name)<EOL>if SQLiteLockFile.testdb is None:<EOL><INDENT>import tempfile<EOL>_fd, testdb = tempfile.mkstemp()<EOL>os.close(_fd)<EOL>os.unlink(testdb)<EOL>del _fd, tempfile<EOL>SQLiteLockFile.testdb = testdb<EOL><DEDENT>import sqlite3<EOL>self.connection = sqlite3.connect(SQLiteLockFile.testdb)<EOL>c = self.connection.cursor()<EOL>try:<EOL><INDENT>c.execute("<STR_LIT>"<EOL>"<STR_LIT:(>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT:)>")<EOL><DEDENT>except sqlite3.OperationalError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>self.connection.commit()<EOL>import atexit<EOL>atexit.register(os.unlink, SQLiteLockFile.testdb)<EOL><DEDENT>
>>> lock = SQLiteLockFile('somefile')
>>> lock = SQLiteLockFile('somefile', threaded=False)