Don Parris wrote:
> Greetings,
> 
> 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
> command-line):
> 
> 
>>>>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.
> 
> Don

Don,

 From the documentation[1] it looks like pgdb requires the mxDateTime 
module[2] to work properly. You'll need to go to the URL[2], download a 
copy in the appropriate format and install it on your system.

[1] http://www.druid.net/pygresql/README.txt
[2] http://www.egenix.com/files/python/mxDateTime.html

Regards,
Andy
-- 
--------------------------------------------------------------------------------
 From the desk of Andrew J Todd esq - http://www.halfcooked.com/

_______________________________________________
DB-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/db-sig

Reply via email to