Python 2.4.2 using msvcrt71.dll on Win and compatibility issues

"Martin v. Löwis" martin at v.loewis.de
Tue Feb 7 14:43:32 EST 2006


Christoph Zwerschke wrote:
> Is there a general strategy to avoid this kind of problems?

In general, the only Microsoft-supported strategy is that you
must use only a single msvcrt in the entire application. So
either recompile PostGres, or recompile Python.

In the specific case, having PQprint print to a string (rather
than to a file) might work. OTOH, it appears there is no "print
to string" code in postgres.

So here is another strategy: flush the stream before going
into postgres, then obtain the fileno() of the stream, and
fdopen it with postgres' iostreams library. That might also
be tricky to implement, but could work.

Regards,
Martin



More information about the Python-list mailing list