getstatusoutput() delays earlier command

I can explain that. When you create or update a window, the action
doesn't happen immediately. Instead, the code sends a windows message
to the current process requesting that action be taken. In the case of
creating a wx.MiniFrame, the real grunt work takes a WM_CREATE message
and a WM_PAINT message.

Those messages remain in the queue until your main message loop gets
around to checking the queue and dispatching the messages. As long as
your main thread is busy doing computation, it never gets back to the
message loop, so the messages never get handled, and the window doesn't
update.

Doing a wx.Yield() basically drains the message queue, dispatching
everything that was queued up. (It does this by running a second,
temporary mesage loop.) Anything that lets you get back to the main
loop will allow this to work. So, for example, doing the computation in
a separate thread, or spinning of the process asynchronously, would also
have allowed the message to display.

ยทยทยท

On Wed, 26 Apr 2006 15:07:24 +0100, peter bunney <python@rabbitus.co.uk> wrote:

Thanks to everyone - Yield() fixed it.

Don't really understand why I had to do that bit of magic. David's
ideas on process management sound v. good, but I will have to go &
read some more about wx.Yield, wx.Execute, etc. first. ( I did say I
was a newbie! )

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.