Re: wxPython: TextCtrl delayed update when using TE_RICH(2)

2007-02-05 Thread jean-michel bain-cornu
> > This is almost totally wrong. There is no "new event loop" involved. > The OP is running a long task in the main thread, which is blocking > the event loop. When the event loop is blocked, the application will > not update and cannot be interacted with. It's that simple. The event > loop in a

Re: wxPython: TextCtrl delayed update when using TE_RICH(2)

2007-02-05 Thread Chris Mellon
On 2/5/07, jean-michel bain-cornu <[EMAIL PROTECTED]> wrote: > >> For this kind of stuff, I'd try to put "self.out.WriteText(string)" in > >> some 'Idle' event, which avoid to fall in focus loops or other objects > >> events management problems not easy to solve. > >> > > > > This doesn't have anyt

Re: wxPython: TextCtrl delayed update when using TE_RICH(2)

2007-02-05 Thread jean-michel bain-cornu
>> For this kind of stuff, I'd try to put "self.out.WriteText(string)" in >> some 'Idle' event, which avoid to fall in focus loops or other objects >> events management problems not easy to solve. >> > > This doesn't have anything to do with focus loops or otherwise, it's > because the OP isn't fa

Re: wxPython: TextCtrl delayed update when using TE_RICH(2)

2007-02-05 Thread Chris Mellon
On 2/4/07, jean-michel bain-cornu <[EMAIL PROTECTED]> wrote: > Hi, > > def Execute(self, evt): > > print "Start query" > > time.sleep(5) > > > > The "Start query" message should show in the *messages* box when I > > press the button. Instead, it shows only after the time.sleep(5) > > delay.

Re: wxPython: TextCtrl delayed update when using TE_RICH(2)

2007-02-04 Thread jean-michel bain-cornu
Hi, > def Execute(self, evt): > print "Start query" > time.sleep(5) > > The "Start query" message should show in the *messages* box when I > press the button. Instead, it shows only after the time.sleep(5) > delay. > > If I don't use the wx.TE_RICH / wx.TE_RICH2 style on *messages*, the >

wxPython: TextCtrl delayed update when using TE_RICH(2)

2007-02-03 Thread citronelu
I made a small wxPython app that retrieves web data; for visual logging I use a TextCtrl widget, and stdout is redirected to it, something like this: class RedirectOutput: def __init__(self, objectTxtCtrl): self.out = objectTxtCtrl def write(self, string): self.out.WriteTe