Using win32api.GetTickCount() over the network
Donovan Hide
donovan at passion-pictures.com
Thu Mar 6 10:42:13 EST 2003
Hi Dave and Mark,
thanks very much for your responses, you have inspired me to rethink my
design and answered my questions. The client-server model suggested by Dave
seems more powerful, but I am not convinced that I cannot do what I want
from a single program running on one machine. Thank you for the intro to
socket programming though!
Have been playing around with the various win32 modules today and I
think I have found a problem with the win32pdh module.
Given the following snippet (re-used from this newsgroup!):
import win32pdh
import win32api
list = win32pdh.EnumObjectItems(None, None , 'Process' ,
win32pdh.PERF_DETAIL_WIZARD , 0 )
#print list[1]
spider = 'Spider' in list[1]
afterfx = 'AfterFX' in list [1]
if spider == 1:
print "Spider Is Running"
if afterfx == 1:
print "After Effects is running"
I get the desired answers, when run on Windows 2000 and Windows NT 4
machines, but run under XP I get:
File "GetProcesses.py", line 4, in ?
list = win32pdh.EnumObjectItems(None, None , 'Process' ,
win32pdh.PERF_DETAIL_WIZARD , 0 )
pywintypes.api_error: (-2147481646, 'EnumObjectItems for buffer size', 'No
error message is available')
>Exit code: 1
Any ideas? I have .Net Framework installed on the XP box.
Very grateful fo your time,
Donovan Hide.
More information about the Python-list
mailing list