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:')
cur = db.cursor()
print "SQLite 3 simple shell from\n\n"
while True:
    cmd = input("sql> ")#in python2.7 use raw_input
        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.