Re: wxPython before MainLoop



On Aug 9, 8:51 pm, "[david]" <da...@xxxxxxxxxxx> wrote:
I'm disappointed that I didn't get a wxPython solution.

If the only way to get wxPython to correctly handle
this simple task is to code around it, I don't think
wxPython is really ready for Windows.

Is there a better place to ask?

Regarding the suggestions:

Bjoern, you're wrong. The GUI needs to be displayed
for the user to analyse. A delay between display and
readiness is much better than a delay before display
or a delay with the GUI half-drawn.

Mike, the screen does display correctly, it's just
that in Windows, screen updates are not processed
while the application is busy.

7Stud, that's a solution. Unless anyone comes up
with a direct solution, I guess I'll have to do that.

[david]

[david] wrote:
I'd like to refresh the display before I start the main loop.

I have code like this:

app = App()
app.Show()
app.long_slow_init()
app.MainLoop()

The main frame partly loads at Show, but because the mainloop has not
started yet, the display does not update until long_slow_init() finishes.

Alternatively, I could code

app = App()
app.long_slow_init()
app.Show()
app.MainLoop()

Which would give me a crisp Show, but there would be a long slow wait
before the app showed any activity at all. I would need a splash screen.

I'd rather not have a splash screen (and I don't know how anyway). I'd
like to just make app.Show() finish correctly before running
long_slow_init.

Is there a wx internal method that I can use to give Windows the
opportunity to finish painting the frame before I run long_slow_init()?

Or is there a better idea?

(david)

Chris is right. The only way to interact with a gui is with a separate
thread, otherwise you're blocking the gui's mainloop thread. That's
why I gave that link. That's how to do it in every GUI I'm aware of.

Mike

.



Relevant Pages

  • Re: Best book for creating GUI using Visual C++ (VS 2003)
    ... Microsoft does not seem to have anyone establishing GUI design ... Rarely do I need to see two windows at once. ... display, and do my editing full-screen in the left-hand display. ...
    (microsoft.public.vc.mfc)
  • Re: wxPython before MainLoop
    ... If the only way to get wxPython to correctly handle ... LOL -- did you try coding this app with native windows means, ... I suggest you first went getting experience with other GUI libraries ...
    (comp.lang.python)
  • Re: Newbie Python questions
    ... question is in regard to GUI platforms. ... Windows, but I would also like be able to support Linux and Mac ... I happen to be a big wxPython fan. ...
    (comp.lang.python)
  • Re: What is the best Python GUI API?
    ... applications look beautiful but I hate the license. ... and I'm now a happy wxPython user. ... My very first GUI application ever was a wxPython Windows ...
    (comp.lang.python)
  • Re: how to display web content in a Gui window
    ... several windows in the GUI to display the dynamic web ... windows to handle different tasks. ... ' can display the web contents in a separate ...
    (comp.soft-sys.matlab)