[Mailman-Users] Custom footer based on sender's email
Mark Sapiro
msapiro at value.net
Thu May 11 23:53:17 CEST 2006
Mark Sapiro wrote:
>Rob Jackson wrote:
>
<snip>
>>+ pl = msg.get_payload(decode=True)
>>+ re.sub('AZ', 'new text', pl)
>>+ msg.set_payload(pl)
<snip>
>
>It looks OK to me.
Actually, it's not OK. I overlooked the fact that Python strings are
immutable and re.sub doesn't (can't) change them in place. Thus,
re.sub('AZ', 'new text', pl)
needs to be
pl = re.sub('AZ', 'new text', pl)
--
Mark Sapiro <msapiro at value.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list