/usr/share/pyshared/axiom/scripts/pysql.py is in python-axiom 0.6.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import sys
import readline # Imported for its side-effects
import traceback
from pysqlite2.dbapi2 import connect
from pprint import pprint
con = connect(sys.argv[1])
cur = con.cursor()
while True:
try:
cur.execute(raw_input("SQL> "))
results = cur.fetchall()
if results:
pprint(results)
except:
traceback.print_exc()
|