Decimal separator from python to C
"M." <[email protected]> Mon, 26 Mar 2012 17:32:24 -0300
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <CACd0G9zfcGPe_eWHMpZphDGeResF8g2sDQK6v1hkdXehHGyteA@mail.gmail.com> |
Hi all, I'm using ctypes as a wrapper from a Pyside program to a C program. Everything goes smoothly till I have to pass values to the C function. The C function receive the values correctly when using ctypes.c_double(), but the separator _inside_ the C code changed from . to , and that is REALLY weird. Printing the data from python it shows that is a float, and inside the C code everything is declared accordingly. printf inside the C code shows a comma , as the separator, while a C code compiled using the same compiler on the same system shows period . as the separator. Any clues? My locale is pt_BR-UTF-8. Thanks ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure