Hi all,
I have the following lines as part of a larger app, which form part of
a function for terminating processes (as per an example in the pywin32
package dir):
import win32pdhutil
win32pdhutil.FindPerformanceAttributesByName("System")
It seems that on 64-bit systems [1], even with the full Python stack
running in 32-bit mode quite happilly, this fails with the following
message:
Traceback (most recent call last):
File "pdhutil.py", line 3, in <module>
win32pdhutil.FindPerformanceAttributesByName("System")
File "C:\Python25\Lib\site-packages\win32\lib\win32pdhutil.py", line
77, in FindPerformanceAttributesByName
if object is None: object =
find_pdh_counter_localized_name("Process", machine)
File "C:\Python25\Lib\site-packages\win32\lib\win32pdhutil.py", line
42, in find_pdh_counter_localized_name
return win32pdh.LookupPerfNameByIndex(machine_name,
counter_english_map[english_name.lower()])
KeyError: 'process'
I am happy to go and try to debug this (even with no "real" win32 API
experience) but if there is something obvious that I'm doing wrong
here I would love to know. This works on 32-bit Windows XP and Vista.
[1] The only 64-bit system I have access to at the moment is Vista,
but that seems to be the only apparent difference between this error
occurring and not occurring.
Regards,
Wayne
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32