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 <[EMAIL PROTECTED]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp