[python-win32] win32dph.EnumObjectItems problem

Mark Hammond mhammond at skippinet.com.au
Wed Apr 6 10:44:55 CEST 2005

> Hi All,
> I have a problem using win32pdh with Python22.
> The call of win32pdh.EnumObjectItems changes the
> decimal point from . to , on my system.
> I think it could be a problem with the language setting
> form german.
> So I run in trouble with unpickle of float objects.
> Is there a soulution or workaround?
> The problem occurs under german language setting
> for windows.
> For german EnumObjectItems neede 'Prozess' insted of 'Process'
> to work.

We struck a very similar problem when using MAPI with SpamBayes.  After
making the call to the external library (PDH), try adding:

locale.setlocale(locale.LC_NUMERIC, "C")

(obviously after importing locale)

That should reset everything to the state where Python works correctly.  I
believe this is fixed in Python itself in 2.4.


More information about the Python-win32 mailing list