How to build the pysqlite? Where to find the "sqlite3.h"?

saju.pillai at gmail.com saju.pillai at gmail.com
Wed Nov 5 17:03:39 CET 2008


On Nov 5, 12:29 pm, Dennis Lee Bieber <wlfr... at ix.netcom.com> wrote:
> On Tue, 04 Nov 2008 21:58:17 -0500, david.l... at preisshare.net declaimed
> the following in comp.lang.python:

>
> > Python depends upon Sqlite... which is weird... but it is what I discovered...
>
>         Not really (weird). Python, as of 2.5, includes the PySQLite DB-API
> adapter as part of the native library/source code. BUT SQLite is NOT
> part of Python (the Windows installers typically include the SQLite
> engine as a convenience, but Linux installers expect the engine to
> already be available).


To clarify further. sqlite is supported in python by providing python
language bindings over the sqlite *native* apis. SQLite is written in
C; pysqlite uses the SQLite C api and intelligently glues it into the
python interpreter and makes python language apis available to you.
This is why Python (pysqlite2 rather) depends on the native SQLite
libraries

This is usually how any new functionality would be made available in
python - by writing python wrappers over the existing native
libraries. The other method would be to re-implement the complete
functionality in pure python (an eg of this technique would be
paramiko which implements SSH2 in pure python)

-srp
>
>         None of the other database adapters are part of the base library.
> --
>         Wulfraed        Dennis Lee Bieber               KD6MOG
>         wlfr... at ix.netcom.com              wulfr... at bestiaria.com
>                 HTTP://wlfraed.home.netcom.com/
>         (Bestiaria Support Staff:               web-a... at bestiaria.com)
>                 HTTP://www.bestiaria.com/




More information about the Python-list mailing list