wx Python event question

Steve stephen.mc at gmail.com
Sat Jan 27 05:01:29 EST 2007


use wx.Timer - you bind a method to a timer event and define the
timer's interval when you start it

timer = wx.Timer(self, -1)
self.Bind(wx.EVT_TIMER, self.timerMethod, timer)
timer.Start(500)


On Jan 27, 5:56 pm, "dudds" <d... at netspace.net.au> wrote:
> Hi I really haven't used wxPython before and I was just wondering if
> there was some sort of timer event that can be used. For example if I
> have a database that I want to query at regular intervals and display
> the results in a window is that possibly to do under a wx Python
> program?
>
> So far I have come across certain event handlers, but they all seem to
> wait for something to happen, like moving the mouse, clicking on a
> button etc. I just want to display the results of a query every so
> often automatically without having to press a button to do so.
>
> I'm not looking for a complete solution as I'm doing this so I can
> teach myself Python, but a bit of a hint or a nudge in the right
> direction would be great.




More information about the Python-list mailing list