[python-win32] pb with string conversion to float and GetObject call

Bob Gailer bgailer at alum.rpi.edu
Wed Sep 10 10:42:29 EDT 2003


Double-Hmm ... I can not duplicate this behavior on my Win 2k Server
:
At 08:10 AM 9/10/2003, popov wrote:

>Here's a strange one:
>
>print float('8.4')
>
>Works as expected.
>But:
>
>import win32com.client
>obj = win32com.client.GetObject ("winmgmts:")
>print float('8.4')
>
>Throws a 'ValueError: invalid literal for float(): 8.4' exception on the
>print line !
>If you use '8,4' instead of '8.4', then it works (!). So it seems that some
>locals have been modified here by the call to GetObject (without this call -
>leaving only the import statement - the problem does not show up).
>Note that using 'LDAP:' instead of 'winmgmts:', everything is ok. So maybe
>the culprit is the winmgmts provider...
>If someone could test this and let me know the results. Thx
>
>My system: W2k Server english, python 2.3, pywin32 for python 2.3.
>
>
>
>_______________________________________________
>Python-win32 mailing list
>Python-win32 at python.org
>http://mail.python.org/mailman/listinfo/python-win32
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.506 / Virus Database: 303 - Release Date: 8/1/2003

Bob Gailer
bgailer at alum.rpi.edu
303 442 2625
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.506 / Virus Database: 303 - Release Date: 8/1/2003


More information about the Python-win32 mailing list