Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.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.137 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.73; '*S*': 0.00; 'python': 0.08; 'subject:parsing': 0.09; 'url:github': 0.09; 'am,': 0.13; 'wrote:': 0.15; '3.2.1': 0.16; 'received:192.168.1.40': 0.16; 'sane': 0.16; 'header:In-Reply-To:1': 0.22; 'windows': 0.26; "i'm": 0.27; 'character': 0.28; 'checking': 0.28; 'lee': 0.28; 'ran': 0.30; 'separate': 0.31; 'it.': 0.33; 'to:addr:python-list': 0.34; 'header:User-Agent:1': 0.34; 'there': 0.34; '17,': 0.35; 'crazy': 0.35; 'some': 0.37; 'but': 0.37; 'using': 0.37; 'received:192': 0.38; 'subject:: ': 0.38; 'something': 0.38; 'think': 0.38; 'run': 0.39; 'program,': 0.39; 'went': 0.39; 'received:192.168.1': 0.39; 'should': 0.39; 'version:': 0.39; 'to:addr:python.org': 0.39; 'might': 0.39; "i'd": 0.40; 'minutes': 0.67; 'received:62': 0.67; 'special': 0.67; 'subjectcharset:utf-8': 0.72; 'from:addr:t': 0.84; 'xah': 0.84; 'subject:little': 0.91; 'killed': 0.93; 'old,': 0.97 Date: Tue, 19 Jul 2011 20:14:53 +0200 From: Thomas Jollans User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Iceowl/1.0b2 Icedove/3.1.11 MIME-Version: 1.0 To: python-list@python.org Subject: Re: a little parsing challenge =?UTF-8?B?4pi6?= References: <36037253-086b-4467-a1db-9492d3772e78@r5g2000prf.googlegroups.com> <7ae55705-6342-4f06-add8-59de05d111b9@x12g2000yql.googlegroups.com> <22a6d549-b490-4534-a076-94cb6f21f8ce@h7g2000prf.googlegroups.com> In-Reply-To: <22a6d549-b490-4534-a076-94cb6f21f8ce@h7g2000prf.googlegroups.com> X-Enigmail-Version: 1.1.2 OpenPGP: id=5C8691ED Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1311099294 news.xs4all.nl 23920 [2001:888:2000:d::a6]:58449 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:9907 On 19/07/11 19:49, Xah Lee wrote: > On Jul 17, 8:31 am, Thomas Jollans wrote: >> >> I thought I'd have some fun with multi-processing: >> >> https://gist.github.com/1087682 > > hi Thomas. I ran the program, all cpu went max (i have a quad), but > after i think 3 minutes nothing happens, so i killed it. > > is there something special one should know to run the script? > > I'm using Python 3.2.1 on Windows 7. > > Xah Well, it overdoes the multi-processing “a little”. Checking each character in a separate process might have been overkill. Here's a sane version: https://gist.github.com/1087682/2240a0834463d490c29ed0f794ad15128849ff8e old, crazy version: https://gist.github.com/1087682/6841c3875f7e88c23e0a053ac0d0f0565d8713e2