Correctly Importing SQLite3 in Python-2.5

Rich Shepard <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
   I recall reading that SQLite3 is built into Python-2.5 now, so instead of
writing 'from pysqlite2 import dbapi2 as sqlite3' we write 'import sqlite3'.
But, that's not working here. The error I see is:

Traceback (most recent call last):
   File "eikos.py", line 3, in <module>
     import wx, serial, os, config, functions, sqlite3
   File "/usr/lib/python2.5/sqlite3/__init__.py", line 24, in <module>
     from dbapi2 import *
   File "/usr/lib/python2.5/sqlite3/dbapi2.py", line 27, in <module>
     from _sqlite3 import *
ImportError: No module named _sqlite3

   What is the correct syntax?

TIA,

Rich

-- 
Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.