Hi David, Yep, that does the trick; and turns out to what I did. I think in my explanation I got fixated on the spec saying the \r\n comes before the boundary text and saw handling it in that way as more complex. Peter W. On 04/06/2009, at 12:17 AM, Binger David wrote: > Does it suffice to change: > > self.pat = re.compile( > as_bytes(r'--%s(--)?[ \t]*\r\n' % re.escape(boundary))) > > to > > self.pat = re.compile( > as_bytes(r'--%s(--)?[ \t]*(\r\n)?' % re.escape(boundary))) > > in MIMEInput.__init__()? > > > _______________________________________________ > QP mailing list > QP@mems-exchange.org > http://mail.mems-exchange.org/mailman/listinfo/qp