Re: [Tutor] Fixing garbled email addresses

2007-05-01 Thread Dotan Cohen
On 01/05/07, Daniel Yoo <[EMAIL PROTECTED]> wrote: > Hi Dotan, > > > Just for reference, the weirdness that you're seeing before the email > addresses in your text file are "MIME-encoded" strings. > > http://en.wikipedia.org/wiki/MIME > > Concretely, the string > > "=?UTF-8?B?157XqNeZ15Qg

Re: [Tutor] Fixing garbled email addresses

2007-05-01 Thread Daniel Yoo
Hi Dotan, Just for reference, the weirdness that you're seeing before the email addresses in your text file are "MIME-encoded" strings. http://en.wikipedia.org/wiki/MIME Concretely, the string "=?UTF-8?B?157XqNeZ15Qg15nXoNeY16bXnw==?=" is an encoding of a string in MIME format, and

Re: [Tutor] Fixing garbled email addresses

2007-05-01 Thread Ben Sherman
On 5/1/07, Dotan Cohen <[EMAIL PROTECTED]> wrote: [snip] > > List comprehensions are the best thing ever! > > Happy to help, > Ben > With Gmail one must be careful and check that the To and Subject fields contain what you'd expect. Does 'list comprehension' mean a detailed explanation of the

Re: [Tutor] Fixing garbled email addresses

2007-05-01 Thread Alan Gauld
"Dotan Cohen" <[EMAIL PROTECTED]> wrote > Does 'list comprehension' mean a detailed explanation of the code? No its a programming construct found in Function programming languages such as Haskell (Python is partially functional in nature). Basically a list comprehension builds a list lc = [

Re: [Tutor] Fixing garbled email addresses

2007-05-01 Thread Dotan Cohen
On 01/05/07, Ben Sherman <[EMAIL PROTECTED]> wrote: > Hey there - it would be better if you replied to the list - that way the > answers below could help others.. > > On 5/1/07, Dotan Cohen <[EMAIL PROTECTED]> wrote: > [snip] > > > > # Then filter each line of the file through the regex, discarding

Re: [Tutor] Fixing garbled email addresses

2007-05-01 Thread Ben Sherman
On 5/1/07, Dotan Cohen <[EMAIL PROTECTED]> wrote: I have had the misfortune of having a university Windows machine garble all the email addresses in my addressbook (a txt file so that I can use it both on my home Fedora machine and on the university Windows machines). I figure this is as good a t

[Tutor] Fixing garbled email addresses

2007-05-01 Thread Dotan Cohen
I have had the misfortune of having a university Windows machine garble all the email addresses in my addressbook (a txt file so that I can use it both on my home Fedora machine and on the university Windows machines). I figure this is as good a time as any to start learning python and fix the file