locale on cygwin
Andy Todd
andy47 at halfcooked.com
Fri Jan 25 00:24:46 EST 2002
Andy Todd <andy47 at halfcooked.com> wrote in
news:Xns91A1A678DEEE3andy47halfcookedcom at 203.109.250.24:
> Jason Tishler probably knows the answer to this off the top of his head,
> but ...
>
> I'm having problems getting 'locale' to work with Python under cygwin.
>
> On my Win2k box with standard Python 2.1.1 my session looks like;
Ahhh, don't let your news client auto-format. The correct session is;
PythonWin 2.1.1 (#20, Jul 20 2001, 01:19:29) [MSC 32 bit (Intel)] on
win32. Portions Copyright 1994-2001 Mark Hammond (MarkH at ActiveState.com)
- see 'Help/About PythonWin' for further copyright information.
>>> import locale
>>> locale.getdefaultlocale()
('en_AU', 'cp1252')
>>> locale.setlocale(locale.LC_ALL, '')
'English_Australia.1252'
>>>
>
> But on the same machine with Cygwin python I get;
And this is really what happens;
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. Is there any particular reason why?
>
> I've searched the archives of this newsgroup and the Cygwin mailing list
> and I'm fairly sure this hasn't come up before. If this is a duplicate
> then please accept my apologies in advance.
>
> Regards,
> Andy
Sorry about that.
Andy
--
Contents free posts a speciality
More information about the Python-list
mailing list