October 2001
Beginner to intermediate
400 pages
7h 45m
English
PyGreSQL is a Python interface to the PostgreSQL database. It was written by D’Arcy J.M. Cain and was based heavily on code written by Pascal Andre.
PyGreSQL is implemented as three parts:
C shared module: _pg.so
Two Python wrappers: pg.py and pgdb.py
In the directory containing pgmodule.c, run the following command:
cc -fpic -shared -o _pg.so -I[pyInc] --I[pgInc] --L[pgLib] --lpq pgmodule.c
Compile-time options include the following:
[pyInc] = Python include path (Python.h)
[pgInc] = PostgreSQL include path (Postgres.h)
[pgLib] = PostgreSQL libraries path (libpq.so /libpq.a)
Some of the following keywords can be specified:
| -DNO_DEF_VAR | Disable default variables support. |
| -DNO_DIRECT | Disable direct access ... |
Read now
Unlock full access