だめなこpythonの覚書
{{{
# windows
import locale
locale.setlocale(locale.LC_ALL, "ja")
import time
time.strptime('2009/01/01','%x')
time.strptime('2009/12/01','%x')
import _strptime
_strptime.LocaleTime().LC_date
テストコードが少ないのが品質の悪い原因だな
}}}
{{{
# 玄箱
# LAN=ja
# LANG=ja
# export LANG
# /usr/local/python-2.6.1/bin/python
Python 2.6.1 (r261:67515, Dec 10 2008, 23:25:06)
[GCC 2.95.3 20010315 (release/MontaVista)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL,'')
Traceback (most recent call last):
File "
", line 1, in
File "/usr/local/python-2.6.1/lib/python2.6/locale.py", line 494, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
>>>
/usr/share/localeは無視って感じで
てかどこにlocale持ってるのかな
}}}