Marilyn Davis wrote:
> significant_headers[each] =
> text[len(each):].strip().replace('"','\\"').replace('\n',' ')
This looks like you are trying to make an escaped string, with literal
backslashes. You might prefer using the 'string_escape' codec:
>>> '\n'.encode('string_escape')
'\\n'
Kent
On Fri, 20 Jan 2006, Python wrote:
> On Fri, 2006-01-20 at 13:50 -0800, Marilyn Davis wrote:
> > for each in significant_headers.keys():
> > this = '''self.h_%s = "%s"''' % \
> >(each[:-2].lower().replace('-','_'),
> > repr(significant_he
On Fri, 2006-01-20 at 13:50 -0800, Marilyn Davis wrote:
> for each in significant_headers.keys():
> this = '''self.h_%s = "%s"''' % \
>(each[:-2].lower().replace('-','_'),
> repr(significant_headers[each]))
> exec(this)
So you
On Fri, 20 Jan 2006, Kent Johnson wrote:
Thank you so much Kent. This is *very* helpful.
> Marilyn Davis wrote:
> > Dear Tutors,
> >
> > I'm having a problem and going around in circles. I'm on Python 2.4.1.
> >
> > This odd address line comes in email:
> >
> >
> line = '''"ma >> \"[E
Marilyn Davis wrote:
> Dear Tutors,
>
> I'm having a problem and going around in circles. I'm on Python 2.4.1.
>
> This odd address line comes in email:
>
>
line = '''"ma >> \"[EMAIL PROTECTED]"" <[EMAIL PROTECTED]>'''
>
>
> It makes sense to me, and to the MTA. I want to use it to cr