I know that "pywin32-214.win32-py2.6.exe" this exe provides all the
modules like win32events,win32api and win32error.
But i want to know from where we are getting timer module.
my doubt is , the same exe is providing the Timer module also.
because i removed "pywin32-214.win32-py2.6.exe" in my PC then it is
showing the below error
import timer
ImportError: No module named timer
On May 31, 4:59 am, krishnarao g <krishnaraomc...@gmail.com> wrote:
Hi ,
I know that "pywin32-214.win32-py2.6.exe" this exe provides all the
modules like win32events,win32api and win32error.
But i want to know from where we are getting timer module.
my doubt is , the same exe is providing the Timer module also.
because i removed "pywin32-214.win32-py2.6.exe" in my PC then it is
showing the below error
import timer
ImportError: No module named timer
So, timer is a part of PyWin32. Thus uninstalling PyWin32 will
uninstall the timer module. I usually use wx.Timer in my wxPython
applications, but Ray had some good suggestions too.
The "timer" in Win32 is not a timer, per se, at all - it is a delay
(wait) function in that it holds up code execution until the MSW event
win32event.MsgWaitForMultipleObjects() returns the message
win32event.WAIT_OBJECT_0.
A true python timer needs to create a python event (?) or wx event so
that mainloop processing can continue while the timer is timing out.
For messages that are not already turned into wx events you have to hook into the WndProc chain, like what is shown in the wiki here: HookingTheWndProc - wxPyWiki
···
On 6/3/10 8:05 PM, Ray Pasco wrote:
What I meant was "How can MSW messages create wxPython events so that
there is no polling needed or mainloop hanging ?"