Can't connect Postgres to Python
Dave Brueck
dave at pythonapocrypha.com
Tue Mar 16 16:04:55 EST 2004
John wrote:
> At this point, using the command
> conn = psycopg.connect("dbname=personal", serialize=0)
> from psycogq documentation, I get
> NameError: name 'psycopg' is not defined
>
> What am I missing?
Hi John. You need to import the module first:
import psycopg
You may have more errors to figure out, but this will at least get you to the
next step.
-Dave
More information about the Python-list
mailing list