Python 2.4 binaries for accessing PostgreSQL from Windows?

Frank Millman frank at chagford.com
Sun Feb 6 05:06:18 EST 2005


Frank Millman wrote:
> Hi all
>
> The subject line says it all.
>
> I have been using pypgsql to access PostgreSQL from Linux and from
> Windows, and it works fine.
>
> I am upgrading to Python 2.4. I can recompile pypgsql for Linux, but
I
> do not have a Windows compiler. SourceForge has a binary for Python
> 2.3, which is the one I have been using. It does not have one for
2.4.
>
> I tried the psycopg site, but it does not seem to have binaries at
all.
>
> Does anyone know if either of these will be available in binary form
> for Python 2.4 on Windows?
>

Thanks for your replies, Gerhard and Josef. I have looked at both
solutions, but neither of them seem quite ideal. Hopefully you can show
me a simple way to overcome my problems.

In the case of pyPgSQL, it is overkill for me to load PgAdmin3 on each
Windows workstation running my accounting app. The binary for Python2.3
had a small libpq.pyd which was perfect for my needs. Don't you have
something similar for 2.4?

I have tried psycopg, and I must say I like it. It installs very
easily, and seems faster than pyPgSQL. My initial testing worked fine,
but as soon as I tried to use it from my app I ran into a problem. I
use wxPython as my front end, and it returns all strings as Python
unicode objects. If I pass these to a query, I get "TypeError: argument
1 must be str, not unicode". I could go through my app and convert all
strings back to type str, but it seems unnecessary. Is there a better
solution?

TIA for any advice.

Frank




More information about the Python-list mailing list