Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'package,': 0.03; 'nested': 0.07; 'club.': 0.09; 'any.': 0.16; 'delimiter': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'simpson': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'cheers,': 0.24; 'header:In-Reply-To:1': 0.27; 'tim': 0.29; 'chase': 0.31; 'this.': 0.32; 'supposed': 0.32; "can't": 0.35; 'received:com.au': 0.36; 'charset:us-ascii': 0.36; 'received:211': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'course': 0.61; "you're": 0.61; 'content-disposition:inline': 0.62; 'occur': 0.65; 'subject:Best': 0.91 Date: Thu, 4 Sep 2014 13:52:40 +1000 From: Cameron Simpson To: python-list@python.org Subject: Re: Best way to filter parts of a email.message.Message MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20140903205958.119351c8@bigbox.christie.dr> User-Agent: Mutt/1.5.21 (2010-09-15) References: <20140903205958.119351c8@bigbox.christie.dr> X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=fvDlOjIf c=1 sm=1 tr=0 a=YuQlxtEQCowy2cfE5kc7TA==:117 a=YuQlxtEQCowy2cfE5kc7TA==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=LcaDllckn3IA:10 a=MyCFV4IFUyYA:10 a=W6L5rfBXmJEA:10 a=kj9zAlcOel0A:10 a=vrnE16BAAAAA:8 a=8uR6FKqcAAAA:8 a=kSxMPFTrHXcNolI96kMA:9 a=CjuIK1q_8ugA:10 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1409802771 news.xs4all.nl 2923 [2001:888:2000:d::a6]:45965 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77528 On 03Sep2014 20:59, Tim Chase wrote: >- mime-parts can be nested, so I need to recursively handle them Just to this. IIRC, the MIME part delimiter is supposed to be absolute. That is, it will not occur in the nested subparts, if any. Of course that is no good to you working from outside via the email package, only if you're writing your own message dissector. Cheers, Cameron Simpson You can't wait for inspiration. You have to go after it with a club. - Jack London