Question about RADIXCHAR on Win32

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Thu Oct 8 00:41:33 EDT 2009


En Wed, 07 Oct 2009 08:16:19 -0300, Stephane Wirtel <stephane at openerp.com>  
escribió:

> I have a problem with locale.RADIXCHAR, it seems this constant isn't  
> defined on the Windows platform.
>
> Is there a way to use an equivalent of locale.RADIXCHAR ?

You can obtain that info from localeconv, available on Windows too:

py> import locale
py> locale.localeconv()['decimal_point']
'.'
py> locale.setlocale(locale.LC_ALL, '')
'Spanish_Argentina.1252'
py> locale.localeconv()['decimal_point']
','

-- 
Gabriel Genellina




More information about the Python-list mailing list