locale on cygwin
Jason Tishler
jason at tishler.net
Fri Jan 25 09:08:06 EST 2002
Andy,
On Fri, Jan 25, 2002 at 05:22:02AM +0000, Andy Todd wrote:
> Jason Tishler probably knows the answer to this off the top of his head,
> but ...
Not really, being locale challenged...
> I'm having problems getting 'locale' to work with Python under cygwin.
>
> [snip]
>
> But on the same machine with Cygwin python I get;
>
> Python 2.2 (#1, Dec 31 2001, 15:21:18)
> [GCC 2.95.3-5 (cygwin special)] on cygwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import locale
> >>> locale.getdefaultlocale()
> (None, None)
> >>> locale.setlocale(locale.LC_ALL, '')
> 'C'
> >>>
>
> I presume this means that the _locale module is not present on Cygwin, or
> compiled in with Python.
No, it's there:
/usr/lib/python2.2/lib-dynload/_locale.dll
but...
> Is there any particular reason why?
Yes, IIRC, Cygwin does not currently support locale. Searching the
Cygwin mailing list I have found the following:
http://sources.redhat.com/ml/cygwin/2001-11/msg00458.html
Which seems to concur. Sorry, this is the best that I can do. Maybe
others know for sure.
Jason
More information about the Python-list
mailing list