[Tutor] Question about language code

Dae James daedae11 at 126.com
Fri Oct 12 05:12:47 CEST 2012


Here is a example in "Python v2.7.2 document":

>>> import locale
>>> loc = locale.getlocale() # get current locale
# use German locale; name might vary with platform
>>> locale.setlocale(locale.LC_ALL, 'de_DE')

However, the result of executing on my computer is:
>>> locale.setlocale(locale.LC_ALL, 'de_DE')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\locale.py", line 531, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

Why is it unsuccessful? 
My os is Windows 7. My python version is 2.7.2. 




Dae James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20121012/8edf37ed/attachment.html>


More information about the Tutor mailing list