event loop problem

alex116321 at my-deja.com alex116321 at my-deja.com
Tue Oct 24 11:38:59 EDT 2000


In article <ir2J5.12188$Ab3.56196 at news-server.bigpond.net.au>,
  "Mark Hammond" <MarkH at ActiveState.com> wrote:
> <alex116321 at my-deja.com> wrote in message
> news:8t21ei$e5a$1 at nnrp1.deja.com...
> > I am trying to write a simple Python script which which uses ADO
> > through Python's COM extension but never exit.  For this I have
> writen
> > a simple while loop however this causes a problem on Windows NT.
> > Sometimes other windows on NT broadcast messages which need to be
> > confirmed by all running windows.  If at least one window does not
> > dispatch the confirmation, the broadcaster will hang.  In C++ the
> > solution is to make the main event loop listen for windows messages,
> > for example:
> >
> > while(PeekMessage(&msg,NULL,NULL,NULL,PM_REMOVE)) {
> >   TranslateMessage(&msg);
> >   DispatchMessage(&msg);
> > }
>
> What you want is pythoncom.PumpWaitingMessages()
>
> Mark.
>
>
Thanks Mark, that did the trick.

Alex


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list