Please excuse me if I'm posting something that's been asked 100 times. I've done some searching but can't find what I'm looking for. Also please forgive my greenness, I've only been at this for a week now. I've have extensive experience with shell scripting, some C++, although non of the C was windows related. Hence my using python rather than C to get into windows related programming.

I'm using the basic wizard demo to create an installation wizard. I have it all set and working. The problem is, within any given page if I make any system calls, the window won't update, it won't even draw until it's left the function that has the calls.


def on_page_changed(self, evt):
        'Executed after the page has changed.'
        if evt.GetDirection():  dir = "forward"
        else:                   dir = "backward"
        page = evt.GetPage()
        if page is self.pages[2] and self.valid == 1:
          print ("KEY VALIDATED, PAGE CHANGED %s" % self.valid)
        elif page is self.pages[1] and self.valid == 1:
          # Enter code here to unpack files and start installation.     
          page2.instbegin.SetLabel('Installing Client Software')

if I put it in the page_changing the window starts to change to the next page and won't draw until the system call has finished. I've used .Refresh() .Update() CallAfer() etc...
From what I've read the problem is not the system calls themselves, rather that window updates don't happen until the code has returned to the main loop or exited the event loop or something like that, I don't remember exactly. I thought the refresh() was supposed to bypass that.

What am I missing?

-- I'd rather have a bottle in front of me than a frontal lobotomy.

9 Years
Discussion Span
Last Post by flhtc

A magic trick that worked with me on such problems is self.SendSizeEvent() when you want to refresh. See if it works for you :)


A magic trick that worked with me on such problems is self.SendSizeEvent() when you want to refresh. See if it works for you :)

Thanks for the idea... Alas it did not work, well at least on Linux. I won't have a chance to try it on windows until Monday. Funny thing is that the CallAfter() worked just fine on Linux but not windows.
This ones got me scratchin' my head.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.