PgSQL.py / mxDateTime Question

Gerhard Häring gerhard.nospam at bigfoot.de
Wed Jul 11 17:56:54 EDT 2001


On Wed, 11 Jul 2001 08:17:36 -0400, Rod MacNeil wrote:
>I am installing PyPgSQL v1.2 and have a question about mxDateTime.
>The DBAPI2 module PGSQL.py does not appear to updated for use with the
>newest version of
>mxDateTime (mxBase 2.0.1) which installs using a different directory
>structure (mx/DateTime).
>
>I can certainly edit the PgSQL.py module or tweak the directories around but
>I was wondering if anyone
>knows if PgSQL.py works correctly with the DateTime in the new mxBase
>package?
>The docs for PgSQL.py don't mention any DateTime version info.

Try changing the import to this one:

try:
    from mx import DateTime
except:
    import DateTime

and it will work with older versions of mxDateTime and the current one.

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://highqualdev.com              public key at homepage
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



More information about the Python-list mailing list