Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #52483

Re: Am I not seeing the Error?

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 <nedbat@gmail.com>
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 <nedbat@gmail.com>
Date Tue, 13 Aug 2013 20:00:57 -0400
From Ned Batchelder <ned@nedbatchelder.com>
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 <davea@davea.name>
Subject Re: Am I not seeing the Error?
References <mailman.451.1376187574.1251.python-list@python.org> <kue4u9$ja1$1@dont-email.me> <kue7n0$heh$1@ger.gmane.org>
In-Reply-To <kue7n0$heh$1@ger.gmane.org>
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.555.1376438468.1251.python-list@python.org> (permalink)
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

Show key headers only | View raw


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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Am I not seeing the Error? Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-08-10 22:19 -0400
  Re: Am I not seeing the Error? John Gordon <gordon@panix.com> - 2013-08-12 14:47 +0000
  Re: Am I not seeing the Error? Denis McMahon <denismfmcmahon@gmail.com> - 2013-08-13 20:28 +0000
    Re: Am I not seeing the Error? Dave Angel <davea@davea.name> - 2013-08-13 21:16 +0000
    Re: Am I not seeing the Error? MRAB <python@mrabarnett.plus.com> - 2013-08-14 00:44 +0100
    Re: Am I not seeing the Error? Ned Batchelder <ned@nedbatchelder.com> - 2013-08-13 20:00 -0400
      Re: Am I not seeing the Error? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-08-14 13:20 +1200
        Re: Am I not seeing the Error? Joshua Landau <joshua@landau.ws> - 2013-08-14 07:59 +0100
        Re: Am I not seeing the Error? Chris Angelico <rosuav@gmail.com> - 2013-08-14 13:07 +0100
          Re: Am I not seeing the Error? Roy Smith <roy@panix.com> - 2013-08-14 08:39 -0400
        Re: Am I not seeing the Error? Joshua Landau <joshua@landau.ws> - 2013-08-14 13:34 +0100

csiph-web