Thread: Python Interface
Can anyone recommend a python interface other than pygresql for postgresql. Yet again they have changed the API (pg.error is now pg.Error), and I can get no information from the mailing list, which seems dead. Thanks, Alex Turner netEconomist
On Thu, Feb 10, 2005 at 10:58:05AM -0500, Alex Turner wrote: > Can anyone recommend a python interface other than pygresql for > postgresql. Yet again they have changed the API (pg.error is now > pg.Error), and I can get no information from the mailing list, which > seems dead. psycopg is popular. -- Michael Fuhr http://www.fuhr.org/~mfuhr/
Alex Turner wrote: >Can anyone recommend a python interface other than pygresql for >postgresql. Yet again they have changed the API (pg.error is now >pg.Error), and I can get no information from the mailing list, which >seems dead. > > > Pyscopg is very popular. We use it hear at Command Prompt with great success. J >Thanks, > >Alex Turner >netEconomist > >---------------------------(end of broadcast)--------------------------- >TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > > -- Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC Postgresql support, programming shared hosting and dedicated hosting. +1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com PostgreSQL Replicator -- production quality replication for PostgreSQL
Attachment
On Thursday 10 February 2005 10:19 am, you wrote: > Alex Turner wrote: > >Can anyone recommend a python interface other than pygresql for > >postgresql. Yet again they have changed the API (pg.error is now > >pg.Error), and I can get no information from the mailing list, which > >seems dead. > > Pyscopg is very popular. We use it hear at Command Prompt > with great success. pyscopg is also the one we recommend using with gnuenterprise.org's datasource library. Each of the 4 postgresql drivers we support seem to have their own interpretion of DBSIG. pyscopg though seems to give us the least trouble. Though if IIRC it does round timestamps which can burn a person at times :) I don't have a test case to verify if my memory is correct about this though. Take Care, James
On Thu, Feb 10, 2005 at 01:29:42PM -0600, James Thompson wrote: > Though if IIRC it does round timestamps which can burn a person at times :) > I don't have a test case to verify if my memory is correct about this though. Actually, I think it's just that mxDateTime defaults to displaying times as HH:MM:SS.ss, but the extra precision does appear to be there: In psql: SELECT tm FROM foo; tm ----------------- 14:32:41.219443 In Python: curs.execute('SELECT tm FROM foo') row = curs.dictfetchone() print row['tm'] 14:32:41.21 print row['tm'].second 41.219443 -- Michael Fuhr http://www.fuhr.org/~mfuhr/