Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:not': 0.03; 'read.': 0.03; 'parameters': 0.04; 'syntax': 0.04; 'subject:Error': 0.07; 'bash': 0.09; 'collier': 0.09; 'works.': 0.09; 'cc:addr:python-list': 0.11; "'');": 0.16; 'definition.': 0.16; 'sat,': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; '(not': 0.18; 'seems': 0.21; '>>>': 0.22; 'aug': 0.22; 'coding': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'errors.': 0.24; 'script.': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'function': 0.29; 'wonder': 0.29; 'easier': 0.31; "skip:' 10": 0.31; 'checking': 0.33; 'style': 0.33; 'third': 0.33; 'subject:the': 0.34; 'johnson': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'skip:j 20': 0.36; 'subject:?': 0.36; 'should': 0.36; 'error.': 0.37; 'two': 0.37; 'being': 0.38; 'pm,': 0.38; 'does': 0.39; 'help,': 0.39; 'received:71': 0.39; 'how': 0.40; 'commands': 0.60; 'dave': 0.60; 'first': 0.61; 'offering': 0.63; 'due': 0.66; 'direct': 0.67; 'line,': 0.68; 'skip:m 50': 0.68; 'dozens': 0.84; 'angel': 0.91; 'mistake': 0.91; 'severe': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=p5aVyTtpunv9peBfNmoNJjAGfJNwDNoWWPiuvj5/tWE=; b=CV0lOE8ZOhM2bIzjNe9anOu/Fg/3F/REhWeTs4r8Nb0zRBvfk/JeNCiDhI6B4hdZUa IcxqKFIAHzpLKal7bT9+pGmRhXQSXf070hLqcs7DjEKON7IIcwwlhzcp0z46uUMDuRms hIK1XteWGUVqmRQ+5az0gIuGGElKJpgGOgc38D2SWyyOwvriwH11inIcNoMBBJdSpezt ffjxtE8YhhNVaASiAf81lTJqkJ19cMOkkwgEgB0xTzWUdSo9UohKC4UYW/HaNGK7K4Qy mqIjAS/7odDCZz1cuDB4k8UKi/4HiqacDimLJ4eGRdmAIe+1MXbSJUesz9nThiTNOdsf JQuw== X-Received: by 10.220.171.129 with SMTP id h1mr4126075vcz.28.1376438460601; Tue, 13 Aug 2013 17:01:00 -0700 (PDT) Sender: Ned Batchelder Date: Tue, 13 Aug 2013 20:00:57 -0400 From: Ned Batchelder User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Dave Angel Subject: Re: Am I not seeing the Error? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: python-list@python.org 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: 59 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1376438468 news.xs4all.nl 15883 [2001:888:2000:d::a6]:51158 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52483 On 8/13/13 5:16 PM, Dave Angel wrote: > Denis McMahon wrote: > >> On Sat, 10 Aug 2013 22:19:23 -0400, Devyn Collier Johnson wrote: >> >>> I am checking my 1292-line script for syntax errors. I ran the following >>> commands in a terminal to check for errors, but I do not see the error. >>> JOB_WRITEURGFILES = >>> multiprocessing.Process(write2file('./mem/ENGINE_PID', ENGINEPID); >>> write2file(SENTEMPPATH, ''); write2file(INPUTMEM, '')); >>> JOB_WRITEURGFILES.start() >> When I expand this out to one item per line, >> >> JOB_WRITEURGFILES = >> multiprocessing.Process >> ( >> write2file >> ( >> './mem/ENGINE_PID' >> , >> ENGINEPID >> ) >> ; >> write2file >> ( >> SENTEMPPATH >> , >> '' >> ) >> ; >> write2file >> ( >> INPUTMEM >> , >> '' >> ) >> ) >> ; >> JOB_WRITEURGFILES.start() >> >> and I wonder (not being familiar with multiprocessing) if perhaps there >> should have been a third ";" after the third write2file in the job >> definition. >> > The mistake is not that it's missing the 3rd, but that the first two > semicolons should have been commas. These are parameters to a function > call multiprocessing.Process() Everyone: this program seems to be a direct and misguided transliteration from a bash script. There are dozens of mis-uses like this of multiprocessing.Process(), due to a severe misunderstanding of what it does and how it works. We've tried offering help, and all that's happened is we've been told that this strange coding style is easier to read. --Ned.