Python/Postgres Pygres for Win32 w/o cygwin

Поиск
Список
Период
Сортировка
От SICEm, s.l.
Тема Python/Postgres Pygres for Win32 w/o cygwin
Дата
Msg-id 002d01c0e3fa$a26bd940$1caba6d4@k6
обсуждение исходный текст
Ответы Re: Python/Postgres Pygres for Win32 w/o cygwin  (Jason Tishler <Jason.Tishler@dothill.com>)
Список pgsql-cygwin
Hi all,

The problem:    have Pygresql to use it with Python/Windows and wxPython
Syntoms: Python2.1 crashes when loading _pg.dll (renamed _pgmodule.dll)
Why? Python2.1/Win loading interfaces seems not to be the same than in
Python2.1/cygwin

Solution: Recompile pgmodule with includes and libs of Python2.1/win and
the -mno-cygwin option (MINGW).

I managed to recompile it and it works, but it behaves not the same:
1. when I run Python2.1 from interactively inside DOS-Box, after doing a
import pg, std output disappears. (Also it works, I get no output.)
2. from inside IDLE this does not happen, but when I do the following:
  >>> import pg
  >>> db=pd.DB()
  >>> q=db.query("select * from pg_database")  # or whatever
  >>> q

a) under cygwin it prints the the results of the query. type(q) returns
<type 'pgqueryobject'>
b) under IDLE/Win it prints <pg query result>. type(q) now gives also the
same: <type 'pgqueryobject'> (today, yesterday not).

It seems that Pygres buffers some standard output of libpq into the
queryobject for printing int out.

Thanx,
Erny




В списке pgsql-cygwin по дате отправления:

Предыдущее
От: Jason Tishler
Дата:
Сообщение: Re: [PORTS] NT service design choices
Следующее
От: Jason Tishler
Дата:
Сообщение: Re: Python/Postgres Pygres for Win32 w/o cygwin