By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,767 Members | 1,995 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,767 IT Pros & Developers. It's quick & easy.

How to get System.Timers.Timer

P: n/a
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.

Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Jun 8, 1:37 pm, "BobAtVandy" <Bob.Swith...@comcast.netwrote:
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?
One grabs one's googler and goes a-huntin' ...
==>http://msdn.microsoft.com/en-us/libr...em.timers.aspx
Looks like part of .NET so one might expect that one already have it.
However one would need to use IronPython to access it ...
>
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?
Possibly. Those ones are more likely to be found on the wx mailing
list than here.
Is System.Timers.Timer
likely to solve my problem?
Probably not. Looks like using a sledge-hammer to crack a red herring.
If not, what would?
See "wx mailing list" above.
Jun 27 '08 #2

P: n/a
John Machin wrote:
One grabs one's googler and goes a-huntin' ...
==>http://msdn.microsoft.com/en-us/libr...em.timers.aspx
Looks like part of .NET so one might expect that one already have it.
However one would need to use IronPython to access it ...
Or the PythonDotNET extension for CPython.

Christian

Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.