Did I find the right examples for you? yes no

All Samples(358)  |  Call(356)  |  Derive(0)  |  Import(2)
connect(database[, timeout, isolation_level, detect_types, factory])

Opens a connection to the SQLite database file *database*. You can use
":memory:" to open a database connection to a database that resides in
RAM instead of on disk.

src/u/l/ulif.pynotify-0.2/src/ulif/pynotify/sqlite.py   ulif.pynotify(Download)
    def __init__(self, connection_string=':memory:'):
        """A file walker that supports SQLite to store results.
        """
        self.connection_string = connection_string
        conn = sqlite3.connect(self.connection_string, detect_types=FLAGS)

src/b/o/bots-HEAD/trunk/botsup/bots/botssqlite.py   bots(Download)
def connect(database):
    terug = sqlite.connect(database, factory=BotsConnection,detect_types=sqlite.PARSE_DECLTYPES, timeout=99.0, isolation_level='IMMEDIATE')
    terug.execute('''PRAGMA synchronous=OFF''')
    return terug
 

src/p/y/python-code-snippets-HEAD/CodeSnippets/PyDown/trunk/PyDown/database.py   python-code-snippets(Download)
                self.conn = WrappedConnection(
                    dbapi.connect(
                        host    = host,
                        user    = username,
                        passwd  = password,
            try:
                self.conn = WrappedConnection(
                    dbapi.connect(self.databasename),
                    placeholder = self.placeholder,
                    prefix = self.tableprefix

src/p/y/pyspatialite-3.0.1/doc/includes/sqlite3/apsw_example.py   pyspatialite(Download)
 
# Create pysqlite connection from APSW connection
con = sqlite3.connect(apsw_con)
result = con.execute("select times_two(15)").fetchone()[0]
assert result == 30

src/t/g/TGOpenIDLogin-0.1/tgopenidlogin/controllers.py   TGOpenIDLogin(Download)
        from pysqlite2 import dbapi2 as sqlite
        from openid.store import sqlstore
        con = sqlite.connect('openid.db')
        return sqlstore.SQLiteStore(con)
    store = property(getStore)

src/g/e/genropy-HEAD/gnrpy/gnr/sql/adapters/gnrsqlite.py   genropy(Download)
    def connect(self):
        """Return a new connection object: provides cursors accessible by col number or col name
        @return: a new connection object"""
        dbpath = self.dbroot.dbname
        conn = pysqlite.connect(dbpath, detect_types=pysqlite.PARSE_DECLTYPES | pysqlite.PARSE_COLNAMES, timeout=20.0)
        @param cursor: optional cursor object to use"""
        if not os.path.isfile(filepath):
            conn = pysqlite.connect(filepath)
            conn.close()
        if cursor:
        @param encoding: database text encoding
        """
        conn = pysqlite.connect(name)
        conn.close()
 

src/w/i/winappdbg-1.4/examples/miscellaneous/memory_dump_example.py   winappdbg(Download)
 
        # Connect to the database and get a cursor
        database = sqlite.connect(dbfile)
        cursor   = database.cursor()
 

src/e/u/EuroPython2006_PyQt4_Examples-1.0/Database Support/sqlcursorview.py   EuroPython2006_PyQt4_Examples(Download)
view.setAlternatingRowColors(True)
 
conn = dbapi2.connect(":memory:")
query = conn.cursor()
query.execute("create table person(id int primary key, "

src/g/a/gajim-HEAD/src/common/logger.py   gajim(Download)
		# before raise (hopefully should be enough)
 
		self.con = sqlite.connect(LOG_DB_FILE, timeout = 20.0,
			isolation_level = 'IMMEDIATE')
		os.chdir(back)

src/p/y/pyspatialite-3.0.1/doc/includes/sqlite3/converter_point.py   pyspatialite(Download)
#########################
# 1) Using declared types
con = sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_DECLTYPES)
cur = con.cursor()
cur.execute("create table test(p point)")
#######################
# 1) Using column names
con = sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_COLNAMES)
cur = con.cursor()
cur.execute("create table test(p)")

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next