mayusculas y minusculas

Gabriel Genellina gagsl-py2 en yahoo.com.ar
Mie Mar 21 01:14:44 CET 2007


En Tue, 20 Mar 2007 16:27:14 -0300, Arnau Sanchez <arnau en ehas.org>  
escribió:

> ¿No sería mejor con el módulo locale?
>
> # -*- coding: iso-8859-15 -*-
> import locale
> print "á".islower()
> locale.setlocale(locale.LC_ALL, 'es_ES')
> print "á".islower()
>
> # python test.py
> False
> True
>
> Las variables uppercase, lowercase, etc, del módulo string también se  
> ven modificadas con el cambio de locale.

Uh... porqué será que no me funciona?

Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]  
on win32
Type "help", "copyright", "credits" or "license" for more information.
py> import locale
py> locale.setlocale(locale.LC_ALL, '')
'Spanish_Argentina.1252'
py> "á".islower()
False
py> "Ñ".isupper()
False
py> u"á".islower()
True
py> u"Ñ".isupper()
True

-- 
Gabriel Genellina

------------ próxima parte ------------
_______________________________________________
Python-es mailing list
Python-es en aditel.org
http://listas.aditel.org/listinfo/python-es


Más información sobre la lista de distribución Python-es