locale on cygwin
Andy Todd
andy47 at halfcooked.com
Fri Feb 1 05:19:45 EST 2002
Oleg Broytmann wrote:
> On Fri, Feb 01, 2002 at 08:31:43PM +1100, Andy Todd wrote:
>
>> >>> locale.setlocale(locale.LC_ALL, '')
>>Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>> File "/usr/lib/python2.1/locale.py", line 374, in setlocale
>> return _setlocale(category, locale)
>>locale.Error: locale setting not supported
>> >>>
>>angua:/home/andy47# echo $LANG
>>en_AU
>>angua:/home/andy47#
>>
>
> On lInux this means your system lacks files for en_AU locale. It is not
> Python fault. Use different locale, en_EN or any that exists on the system.
>
> Oleg.
>
Thanks for that, but this is what happens if I don't force it;
"""
$ echo $LANG
C
$ python
Python 2.1.1+ (#1, Jan 8 2002, 00:37:12)
[GCC 2.95.4 20011006 (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
Traceback (most recent call last):
File "<stdin>", line1, in ?
File "/usr/lib/python2.1/locale.py", line 339, in getdefaultlocale
return _parse_localename(localename)
File "/usr/lib/python2.1/locale.py", line 272, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale:
"""
Regards,
Andy
--
-----------------------------------------------------------------------
From the desk of Andrew J Todd esq.
"Another year older, still no wiser." - Me, on my birthday
More information about the Python-list
mailing list