How to get System.Timers.Timer

BobAtVandy Bob.Swithers at comcast.net
Sat Jun 7 23:37:15 EDT 2008


I'll greatly appreciate any help on this.  Actually 2 questions:

1.  I believe I need to use the Windows timer  System.Timers.Timer .  The 
examples I find on the web all access that timer by 'import System' . 
(That's System with a capital S.)   I have pywin32 installed and 'import 
System' doesn't find System so I gather it's not in that package.    Where 
does one get the package with Windows' System class?

2.  The reason I've been looking at System.Timers.Timer is that I've written 
a windows-display app and I also use a timer from wx.PyTimer.  However, I 
cannot close the window by clicking the X (Close button) at the top right of 
the window.  And, I then tried explicitly capturing an OnClose event and 
that doesn't fire either.  I then discovered that if I disable the 
wx.PyTimer, the window can be closed, and so I'm looking to try to use 
System.Timers.Timer under the theory (hope) that will avoid this problem of 
the window's not being close-able.
     Can anyone explain why the window won't close?   Is System.Timers.Timer 
likely to solve my problem?  If not, what would?

Again, MANY thanks to anyone who can steer me in the right direction.






More information about the Python-list mailing list