[DB-SIG] PyGreSQL (pgdb) Problem

Don Parris gnumathetes at gmail.com
Thu Jul 28 02:35:10 CEST 2005


I'm running SUSE Linux 9.2, Python 2.3.4.  I'm new to
Python/programming.  I basically installed most of the DVD when I
installed SUSE last Fall.  Things *should* be working properly, but...

What originally started as a MySQL project is now using Postgres for
the larger feature set.  Instead of importing MySQLdb, I now use the
PyGreSQL pgdb module.  When attempting to load the pgdb module for use
in my script, I get this traceback (same when I try it at the

>>> pgdb.connect('localhost:chaddb_a_test:donp:d1o1l2l4')
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
NameError: name 'pgdb' is not defined
>>> import pgdb
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File "/usr/lib/python2.3/site-packages/pgdb.py", line 65, in ?
   except ImportError: import DateTime
ImportError: No module named DateTime

In the pgdb module, I found this (which matches with the traceback):
# Marc-Andre is changing where DateTime goes.  This handles it either way.
try: from mx import DateTime
except ImportError: import DateTime

I have spent a fair amount of time searching the archives for this
issue, but have thus far turned up nothing useful.  I have no module
"mx" that I can find in ../python2.3/lib (or other dirs.  Should I
modify the file to use datetime.so instead?  I'm not certain of the
implications of that, but it doesn't seem like the correct move.  I
greatly appreciate your help.

DC Parris GNU Evangelist
gnumathetes at gmail.com
"Hey man, whatever pickles your list!"

More information about the DB-SIG mailing list