Re: [Tutor] Python String Help

2013-10-29 Thread bob gailer
On 10/28/2013 4:55 PM, Alex Tenno wrote: Hey everyone, Hey back. I'm encountering a problem with a python function that I am supposed to create. What is the problem? You have not told us that! What class is this for? I guess either the class is not the right one for you (over your head) or

Re: [Tutor] Python String Help

2013-10-29 Thread Mark Lawrence
On 29/10/2013 10:18, Walter Prins wrote: Hi, On 28 October 2013 20:55, Alex Tenno mailto:alex.te...@gmail.com>> wrote: Hey everyone, I'm encountering a problem with a python function that I am supposed to create. OK. You should try to actually write the function yourself first,

Re: [Tutor] UnicodeDecodeError while parsing a .csv file.

2013-10-29 Thread eryksun
On Tue, Oct 29, 2013 at 6:33 AM, Albert-Jan Roskam wrote: > Why is do_setlocale=False here? Actually, what does this parameter do? > It seems strange that a getter function has a 'set' argument. On Windows, getpreferredencoding doesn't use setlocale. It calls WinAPI GetACP to fetch the ANSI codep

Re: [Tutor] UnicodeDecodeError while parsing a .csv file.

2013-10-29 Thread Albert-Jan Roskam
--- On Tue, 10/29/13, eryksun wrote: Subject: Re: [Tutor] UnicodeDecodeError while parsing a .csv file. To: "Steven D'Aprano" Cc: tutor@python.org Date: Tuesday, October 29, 2013, 3:24 AM On Mon, Oct 28, 2013 at 7:49 PM, Steven D'Aprano wrote:

Re: [Tutor] Python String Help

2013-10-29 Thread Walter Prins
Hi, On 28 October 2013 20:55, Alex Tenno wrote: > Hey everyone, > > I'm encountering a problem with a python function that I am supposed to > create. > OK. You should try to actually write the function yourself first, then give concrete details about what you've tried, and how you're stuck.

Re: [Tutor] Python String Help

2013-10-29 Thread Amit Saha
On Oct 29, 2013 7:18 PM, "Alex Tenno" wrote: > > Hey everyone, > > I'm encountering a problem with a python function that I am supposed to create. I want my function to look at a string, and then replace each letter in the string with its relative position in the alphabet. for example, 'abcde' wou

[Tutor] Python String Help

2013-10-29 Thread Alex Tenno
Hey everyone, I'm encountering a problem with a python function that I am supposed to create. I want my function to look at a string, and then replace each letter in the string with its relative position in the alphabet. for example, 'abcde' would return '12345', 'zabd' would return '4123', and 'x