Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Fillmore Newsgroups: comp.lang.python Subject: non printable (moving away from Perl) Date: Thu, 10 Mar 2016 19:07:25 -0500 Organization: Aioe.org NNTP Server Lines: 10 Message-ID: NNTP-Posting-Host: SxA1UDOcaYBihz5zYbn9yQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 X-Notice: Filtered by postfilter v. 0.8.2 X-Mozilla-News-Host: news://nntp.aioe.org:119 Xref: csiph.com comp.lang.python:104564 Here's another handy Perl regex which I am not sure how to translate to Python. I use it to avoid processing lines that contain funny chars... if ($string =~ /[^[:print:]]/) {next OUTER;} :)