孤独的猫

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

>>> help(locale)

Help on module locale:

NAME

locale - Locale support.

FILE

c:\python27\lib\locale.py

DESCRIPTION

The module provides low-level access to the C lib's locale APIs

and adds high level number formatting APIs as well as a locale

aliasing engine to complement these.

The aliasing engine includes support for many commonly used locale

names and maps them to values suitable for passing to the C lib's

setlocale() function. It also includes default encodings for all

supported locale names.

>>> import locale

>>> locale.setlocale(locale.LC_ALL, "")

"Chinese (Simplified)_People's Republic of China.936"

>>> lang, encoding = locale.getdefaultlocale()

>>> print lang

zh_CN

>>> print encoding

cp936

>>>

posted on 2012-09-20 13:22  孤独的猫  阅读(190)  评论(0编辑  收藏  举报