[python-win32] timers?

Jeff Peery jeffpeery at seametrics.com
Wed Dec 1 20:10:45 CET 2004


  Hello, I am using a timer for a windows application. I don't
understand the functioning of the timer. For the button below when I
press it I expect the first two messages to appear in the text field,
then wait 3 seconds, then another message appears. However when I push
the button there is the three second delay first, and then all three
messages appear. Any ideas?
 
Thanks
 
Jeff
 
  def OnButton(self, event):
        self.go = TRUE
        #message 1        
        self.TextField.SetValue("Monitor Initiated\n%s"
%self.TextField.GetValue())
        #get the size of the file
        self.fileSize = int(stat(self.textCtrl1.GetValue())[6])
        #while self.go:
        #message 2
        self.TextField.SetValue("Monitor Sleeping\n%s"
%self.TextField.GetValue())
        #start the timer
        sleep(const_checkTime)
        #message 3
        self.TextField.SetValue("Checking File Size\n%s"
%self.TextField.GetValue())
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20041201/24315241/attachment.htm


More information about the Python-win32 mailing list