Time delay loop - better way?
jcarlson at uci.edu
Sat Jul 3 03:50:40 EDT 2004
On Sat, 3 Jul 2004 13:16:59 +1000
Anthony Baxter <anthonybaxter at gmail.com> wrote:
> On Thu, 01 Jul 2004 23:28:17 -0700, Josiah Carlson <jcarlson at uci.edu> wrote:
> > > Q: Is there some way to gracefully suspend a python app for a second or
> > > so then resume? I could write the classic basic dumb
> > > loop-tenzillion-times delay, but that seems inelegant, and well, just
> > > wrong. By the way, I'm also using wxPython, if that helps any.
> > wxTimer
> > The wxPython demo and documentation are your friends.
> Note, though, that wxTimer guarantees only 1Hz-1000Hz. On windows, you
> get only about 40-50Hz. This makes it completely unsuitable for some tasks.
I have used wxTimers for doing asyncore.poll() scheduling every 1/100th
a second, and it seemed to work pretty reliably on my celeron 400.
More information about the Python-list