string module

Fredrik Lundh fredrik at pythonware.com
Mon May 20 06:12:15 EDT 2002


Fernando Pérez wrote:

> Now, at the interactive python prompt:
>
> [~]> python
> Python 2.2 (#1, Feb 24 2002, 16:21:58)
> [GCC 2.96 20000731 (Mandrake Linux 8.2 2.96-0.76mdk)] on linux-i386
> Type "help", "copyright", "credits" or "license" for more information.
> strop
> >>> import string
> >>> string.__file__
> '/usr/lib/python2.2/string.py'
> >>> print string.uppercase
> ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ
> >>>
>
> But running the following file:
>
> import string
> print string.__file__
> print string.uppercase
>
> I get:
>
> [~]> python t.py
> strop
> /usr/lib/python2.2/string.py
> ABCDEFGHIJKLMNOPQRSTUVWXYZ
>
>
> Why the difference?

the readline library might be messing up the locale.

</F>





More information about the Python-list mailing list