International characters and Python's string functions on Linux

Oleg Broytmann phd at emerald.netskate.ru
Mon Aug 9 04:27:08 EDT 1999


On Sat, 7 Aug 1999, Alexander Staubo wrote:
> > import locale
> > locale.setlocale(locale.LC_ALL, "")
> > 
> Good idea, but:
> 
> Python 1.5.2 (#9, Jul  2 1999, 04:33:02)  [GCC 2.8.1] on linux2
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> import locale
> Traceback (innermost last):
>   File "<stdin>", line 1, in ?
>   File "/usr/local/lib/python1.5/locale.py", line 4, in ?
>     from _locale import *
> ImportError: No module named _locale
> >>> 
> 
> This is Slackware Linux 2.2/libc6. Should I configure Python with some 
> kind of magic parameter for the locale stuff to work?

   Just recompile python and enable _locale module (or compile _locale
yourself).

> -- 
> Alexander Staubo             http://www.mop.no/~alex/
> "Elvis skipped around the car and threw open the trunk.
> 'Hoopla!' he was heard to say, 'This is a 7.62mm M134 General
> Electric Minigun. Up to 6,000 rounds per minute. 7.62mm X 51 shells.
> 1.36kg recoil adaptors. Six muzzle velocity of 869m/s.'
> 'Oh,' said Rex, 'So that's what it is.'"
> --Robert Rankin, _They Came And Ate Us: Armageddon 2: The B-Movie_

Oleg.
---- 
    Oleg Broytmann        Netskate/Inter.Net.Ru        phd at emerald.netskate.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list