[DB-SIG] Are there examples of "cursor" use?

D'Arcy J.M. Cain darcy@druid.net
Wed, 11 Apr 2001 06:57:03 -0400 (EDT)


Thus spake Kevin Cole
> I'm working with PostgreSQL and Python.  According to www.python.org,
> D'Arcy J.M. Cain's pgsqldb.py implements the DB-API and after looking at
> AMK's DB-API documentation, I've tried stuff like:
> 
>    import pgsqldb                                  (OK)

>>> import pgsqldb
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named pgsqldb

Did you actually mean "import pgdb"?

>    db = pgsqldb.connect("my_database")             (OK)
>    cursor = db.cursor()                          (Not OK)

What error do you get?

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.