Doing something else within the MainLoop()

All:

I’m trying to implement something continuously within the main loop with NO dependency on whether an event has been triggered. In other words, suppose I want to print a statement for every clock tick of the processor regardless of whether I’m focused in the window, move the mouse, draw a rectangle, etc… I just want it to print something until I close the window/application.

How do I do this? Once the MainLoop() function has been called, I’m not sure how to do some code WITHIN the MainLoop() function since I can’t access it.

-M

···

Express yourself wherever you are. Mobilize!

Marlin Rowley wrote:

I'm trying to implement something continuously within the main loop with NO dependency on whether an event has been triggered.

wx.Timer

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Marlin Rowley wrote:

Here I use self.keepGoing as my boolean to exit the loop. This doesn't work however and I'm not sure why.

What platform? Does samples/mainloop/mainloop.py work for you?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!