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


Groups > comp.lang.python > #52473

Re: Am I not seeing the Error?

From Dave Angel <davea@davea.name>
Subject Re: Am I not seeing the Error?
Date 2013-08-13 21:16 +0000
References <mailman.451.1376187574.1251.python-list@python.org> <kue4u9$ja1$1@dont-email.me>
Newsgroups comp.lang.python
Message-ID <mailman.547.1376428605.1251.python-list@python.org> (permalink)

Show all headers | View raw


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()

-- 
Signature file not found

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