Re: create a string of variable lenght

2010-02-01 Thread Benjamin Kaplan
On Mon, Feb 1, 2010 at 12:00 PM, Tracubik wrote: > Il Sun, 31 Jan 2010 19:54:17 -0500, Benjamin Kaplan ha scritto: > >> First of all, if you haven't read this before, please do. It will make >> this much clearer. >> http://www.joelonsoftware.com/articles/Unicode.html > > i'm reading it right now,

Re: create a string of variable lenght

2010-02-01 Thread Tracubik
Il Sun, 31 Jan 2010 19:54:17 -0500, Benjamin Kaplan ha scritto: > First of all, if you haven't read this before, please do. It will make > this much clearer. > http://www.joelonsoftware.com/articles/Unicode.html i'm reading it right now, thanks :-) [cut] > Solution to your problem: in addition

Re: create a string of variable lenght

2010-01-31 Thread Benjamin Kaplan
On Sun, Jan 31, 2010 at 5:12 PM, Tracubik wrote: > Il Sun, 31 Jan 2010 13:46:16 +0100, Günther Dietrich ha > scritto: > >> Maybe you might solve this if you decode your string to unicode. >> Example: >> >> |>>> euro = "€" >> |>>> len(euro) >> |3 >> |>>> u_euro = euro.decode('utf_8') >> |>>> len(u_

Re: create a string of variable lenght

2010-01-31 Thread MRAB
Tracubik wrote: Il Sun, 31 Jan 2010 13:46:16 +0100, Günther Dietrich ha scritto: Maybe you might solve this if you decode your string to unicode. Example: |>>> euro = "€" |>>> len(euro) |3 |>>> u_euro = euro.decode('utf_8') |>>> len(u_euro) |1 Adapt the encoding ('utf_8' in my example) to wha

Re: create a string of variable lenght

2010-01-31 Thread Tracubik
Il Sun, 31 Jan 2010 13:46:16 +0100, Günther Dietrich ha scritto: > Maybe you might solve this if you decode your string to unicode. > Example: > > |>>> euro = "€" > |>>> len(euro) > |3 > |>>> u_euro = euro.decode('utf_8') > |>>> len(u_euro) > |1 > > Adapt the encoding ('utf_8' in my example) to

Re: create a string of variable lenght

2010-01-31 Thread Günther Dietrich
Tracubik wrote: >i want to print on linux console (terminal) a message like this one: > > >error message of variable lenght > > >to print the asterisks line i do this: > >def StringOfAsterisks(myString): >asterisksString = "*" >

Re: create a string of variable lenght

2010-01-31 Thread Peter Otten
Tracubik wrote: > Hi all, > > i want to print on linux console (terminal) a message like this one: > > > error message of variable lenght > > > to print the asterisks line i do this: > > def StringOfAsterisks(myString): > as

Re: create a string of variable lenght

2010-01-31 Thread Tim Chase
Tracubik wrote: error message of variable lenght to print the asterisks line i do this: def StringOfAsterisks(myString): asterisksString = "*" for i in range(1,len(myString): asterisksString += "*" print aster

create a string of variable lenght

2010-01-31 Thread Tracubik
Hi all, i want to print on linux console (terminal) a message like this one: error message of variable lenght to print the asterisks line i do this: def StringOfAsterisks(myString): asterisksString = "*" for i in range(1,