sqlite for mac?
7stud
bbxx789_05ss at yahoo.com
Thu May 3 13:26:17 EDT 2007
Per the pysqlite installation instructions, this is the test I ran to
confirm that pysqlite installed correctly
>from pysqlite2 import test
>test.test()
and I got output similar to what the docs say should happen:
>ran 101 tests in 0.182s
My python book, "Beginning Python: From Novice to Professional"(2005),
after giving some brief installation instructions for SQLite and
pysqlite, says:
"Once you have pysqlite installed, you can import it as a module,
under the name sqlite."
and then the author provides this example:
>>>import sqlite
>>>conn = sqlite.connect('somedatabase.db')
>>>curs = conn.cursor()
This cursor can then be used to make SQL queries...
>>>conn.commit()
>>>conn.close()
So that is what I tried. Then I changed "sqlite" to "sqlite2" and
"sqlite3" as well.
More information about the Python-list
mailing list