accents in windows

2014-10-30 Thread C@rlos
i cant print any accent(á é í ó ú) or ñ in console when i use windows OS with 
python, the console showme an error or extrangers characters in some cases, i 
need help 

III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 
2014. Ver www.uci.cu

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: accents in windows

2014-10-30 Thread C@rlos
thanks U, but the real problem is:

i have a path C:\Users\yanet\Desktop\áaaéeeíiiióooúuuñnn 
this path is correct, áaaéeeíiiióooúuuñnn is the name of a directory
but when i try to use os.walk() usin this path, dont work, for os this path 
dont exist, i try every things but nothing works.

some help???


- Mensaje original -
De: "Chris Angelico" 
CC: python-list@python.org
Enviados: Jueves, 30 de Octubre 2014 4:42:49
Asunto: Re: accents in windows

On Thu, Oct 30, 2014 at 11:03 AM, C@rlos  wrote:
> i cant print any accent(á é í ó ú) or ñ in console  when i use windows OS
> with python, the console showme an error or extrangers characters in some
> cases, i need help

What version of Python? What is your code page set to?

Windows and Unicode don't play very nicely together. You may find it
better to use Idle (which has a GUI for this kind of display), and you
will almost certainly find things easier on Linux.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

-- 
Conserva lo que tienes...Olvida lo que te duele...Lucha por lo que quieres... 
Valora lo que posees...Perdona a los que te hieren y disfruta a los que te 
aman. Nos pasamos la vida esperando que pase algo... y lo único que pasa es la 
vida. No entendemos el valor de los momentos, hasta que se han convertido en 
recuerdos. Por eso... Haz lo que quieras hacer, antes de que se convierta en lo 
que te "gustaría" haber hecho.. No hagas de tu vida un borrador, tal vez no 
tengas tiempo de pasarlo en limpio !! 

.C@rlos 

III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 
2014. Ver www.uci.cu
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: I need algorithm for my task

2014-11-05 Thread C@rlos
I thing this work: 

stg='pythonpython' 
foundationline=stg[ 0:( stg [ 1: ].index( stg[ 0 ])+1 ) ] 

On 2014-11-05 11:58, lordvita...@gmail.com wrote: 
> I have line 'pythonpythonpyth'. How do I know which word is the foundation 
> line?. 
> Other examples: 
> "pythonpythonpyth" is python 
> "DOLORIUMD" is DOLORIUM 
> "HELLOLHELLO" is HELLOL 
> "thewordword" is thewordword 
> 
> I need to know whether the word in the text is repeated and get it. This will 
> be the key. 
> 
Consider the first example. 

If the foundation is the first 1 character 'p' and you repeat it enough 
times you'll get ''. 

This is the same length as the line. 

Does it match the line? No. 

OK. 

If the foundation is the first 2 characters 'py' and you repeat it 
enough times you'll get 'pypypypypypypypy'. 

This is the same length as the line. 

Does it match the line? No. 

OK. 

If the foundation is the first 3 characters 'py' and you repeat it 
enough times you'll get 'pytpytpytpytpytpyt'. 

This is longer than as the line, so truncate it to 'pytpytpytpytpytpy'. 

Does it match the line? No. 

OK. 

Continue in this vein until you'll get a match. (The foundation might 
in fact be the entire line.) 

-- 
https://mail.python.org/mailman/listinfo/python-list 

III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 
2014. Ver www.uci.cu-- 
https://mail.python.org/mailman/listinfo/python-list


Convert Qstring to string in windows

2014-10-17 Thread C@rlos

I have been tryed to convert a Qstring text to string on python, in linux that 
work fine but in windows when qstring contine á,é,í,ó,ú the converted text is 
not correct, contine extranger characters, 
this qstring text is an url from qdialogtext. 

in linux i do for this way: 
pythonstringtext=qstringtext.text().toUtf8.data() 
and it return a python string correctly. 

i need some help plese... 

.C@rlos 


III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 
2014. Ver www.uci.cu

-- 
https://mail.python.org/mailman/listinfo/python-list