decimal seperator on W2000 changes

vincent delft vincent_delft at yahoo.com
Mon Sep 10 05:48:44 EDT 2001


I'm running Python 2.1 with WIN32ALL on a W2000
machine with comma as decimal seperator (Windows
regional setting for my country).

I've founded that after a call to win32pdh, all the
floating numbers have a new decimal seperator.

Indeed, before the call the floating point use the "."
as seperator.  After the call they used the ",".
(test the code append to this mail)

Does anyone has an idea to avoid this (other parameters sent to
EnumObjects) ? a work-around ?  a fix ?

I'm using Win32pdh to get the list of Processes and their CPU and memory
usage.
Is there an another (thant win32pdh) way to get those info ?


Thanks



import time
import win32pdh

print 4.0/3.0
print time.time(),time.time()*1.2
dummy = win32pdh.EnumObjects(None,None,win32pdh.PERF_DETAIL_WIZARD,1)
print 4.0/3.0
print time.time(),time.time()*1.2


C:\tmp>python test.py
1.33333333333
999636229.395 1199563475.27
1,33333333333
999636230,146 1199563476,18

C:\tmp>






More information about the Python-list mailing list