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 and self.valid == 1: print ("KEY VALIDATED, PAGE CHANGED %s" % self.valid) wizard.DisableButton(self,wx.ID_CANCEL) wizard.DisableButton(self,wx.ID_BACKWARD) elif page is self.pages and self.valid == 1: wizard.DisableButton(self,wx.ID_BACKWARD) # Enter code here to unpack files and start installation. page2.instbegin.SetLabel('Installing Client Software') wizard.install(self)
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.