From: Stef M. <ste...@gm...> - 2010-07-20 12:50:53
|
On 20-07-2010 13:39, Stefano Mtangoo wrote: > seems like I'm missing something. > Could you give an example on how you override that? class My_App ( wx.App ) : def MainLoop(self): # take over the event loop, but save the old one self.My_EventLoop = wx.EventLoop () old = wx.EventLoop.GetActive () wx.EventLoop.SetActive ( self.My_EventLoop ) while PG.App_Running : do what ever you like here, e.g. do a step of VPython while self.My_EventLoop.Pending(): self.My_EventLoop.Dispatch() self.ProcessIdle() # normally 50 fps ddT = Application.VM_Delay - ( time.time() - Loop_Time ) if ddT > 0 : time.sleep ( ddT ) Loop_Time = time.time() |