[python-win32] about wmi exception
mail at timgolden.me.uk
Wed Jul 16 14:50:03 CEST 2008
Patrol Sun wrote:
> Thanks. Can you tell me how long the polling period of the process
> creation is? So I can use the sleep and poll instead of the process
> creation monitoring.
You can specify it, but I don't believe you can get anything
finer than 1 second. But even if you're running the watcher
in a separate thread, a second process could be created
between the time you notice the first one and the time you
start watching again. And WMI won't pick it up retroactively.
Obviously, if you're rolling your own polling loop then you
can decide how often you *need* to check for the existence
of a process -- ie how often you expect it to be created and
how fast you need to react when it is.
More information about the python-win32