FANDOM


This is a very simple SQLite shell. It creates a database in memory.

This is a example of using the DB-API.

import sqlite3
 
db = sqlite3.connect(':memory:')
 
print "SQLite 3 simple shell from python.wikia.com\n\n"
 
while True:
    cmd = input("sql> ")
    try:
        db.execute(cmd.strip())
        if cmd.lstrip().upper().startswith("SELECT"):
            print cur.fetchall()
    except sqlite3.Error, e:
       print "An error occurred:", e.args[0]

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.