Hi All,
I don't have much knowledge about Windows Services but I have read about
the Python Modules and seen the demo that comes with the py2exe package.
I need to write an NTService which runs a process (an Executable) when
the System (WinXP, Win2003) is Idle. Is it possible to do this from
Are you saying that you want to launch a program that waits until the
CPU's idle time is at a given threshold and once the threshold is met
the program does something until the threshold is no longer met after
wich your app waits for the threshold again?
-Original Message-
From: [EMAIL
Title: Message
In
this example, I am using WScrip, so the available methods should be found by
looking up WScript:
from
win32com.client import Dispatchfrom time import
sleeps=Dispatch('WScript.Shell')s.Run('Explorer http://www.msn.com')
or:
from
win32com.client import Dispatchfrom time
I think this example is what you want to do. It is not a service, but
you can turn it into one.
import win32pdh
from time import sleep
import threading
pdhQuery = win32pdh.OpenQuery(None, 0)
class PDH_COUNTER_PATH_ELEMENTS(list):
def __init__(self, l = None):
if not l:
l =