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


Groups > comp.lang.python > #99398

Re: Bi-directional sub-process communication

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Cameron Simpson <cs@zip.com.au>
Newsgroups comp.lang.python
Subject Re: Bi-directional sub-process communication
Date Wed, 25 Nov 2015 08:06:39 +1100
Lines 24
Message-ID <mailman.36.1448400355.20593.python-list@python.org> (permalink)
References <d3a0321e890997eac47f9c9430f7d6bc@ravnalaska.net>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii; format=flowed
X-Trace news.uni-berlin.de 2YvApoPYuqV9MtUUrkKz7AENOcZBL0o3y9qKnZUza7yg==
Return-Path <cameron@cskk.homeip.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:skip:c 10': 0.07; 'cc:addr:python-list': 0.09; 'subject:process': 0.09; ':-)': 0.12; 'def': 0.13; '>>on': 0.16; '>on': 0.16; '>that': 0.16; 'ah,': 0.16; 'cc:name:python': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:io': 0.16; 'received:optusnet.com.au': 0.16; 'received:psf.io': 0.16; 'received:syd.optusnet.com.au': 0.16; 'self.event': 0.16; 'simpson': 0.16; 'subject:sub': 0.16; 'sunny': 0.16; 'threading': 0.16; 'wrote:': 0.16; '>>>': 0.20; 'cc:addr:python.org': 0.20; 'cc:2**1': 0.22; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'example': 0.26; 'module.': 0.27; 'code:': 0.29; 'service,': 0.31; 'skip:_ 10': 0.32; 'received:com.au': 0.33; 'open': 0.33; 'skip:> 10': 0.35; 'knowledge': 0.35; 'should': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'done.': 0.37; 'charset :us-ascii': 0.37; 'subject:-': 0.39; 'close': 0.61; 'course': 0.62; 'cameron': 0.66; 'doors': 0.72; 'satisfaction': 0.72; 'pleasure': 0.79; '>of': 0.84; 'out!': 0.84; 'glad': 0.87
Content-Disposition inline
In-Reply-To <d3a0321e890997eac47f9c9430f7d6bc@ravnalaska.net>
User-Agent Mutt/1.5.23 (2014-03-12)
X-Optus-CM-Score 0
X-Optus-CM-Analysis v=2.1 cv=R4L+YolX c=1 sm=1 tr=0 a=EBcx3FSHdMIVXc4TnVAPjw==:117 a=EBcx3FSHdMIVXc4TnVAPjw==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=vrnE16BAAAAA:8 a=kj9zAlcOel0A:10 a=qtqOOiqGOCEA:10 a=ZKC22CbfAAAA:8 a=MSVoIKkzEwKK82JP-ZwA:9 a=3imzSCIC56C3UPIU:21 a=j_1uWdDrGmOlJG2w:21 a=CjuIK1q_8ugA:10
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:99398

Show key headers only | View raw


On 24Nov2015 06:33, israel <israel@eraalaska.net> wrote:
>On 11/23/2015 20:29, Cameron Simpson wrote:
>>On 24Nov2015 16:25, Cameron Simpson <cs@zip.com.au> wrote:
>>>Completely untested example code:
>>>
>>>class ReturnEvent:
>>>  def __init__(self):
>>>    self.event = Event()
>>
>>With, of course:
>>
>>   def wait(self):
>>     return self.event.wait()
>
>Of course :-) Ah, the Event() object comes from the threading module. 
>That makes sense. This should work perfectly. Thanks so much for 
>taking the time to help me out!

Glad to be of service,
Cameron Simpson <cs@zip.com.au>

All the doors in this ship have nice sunny dispositions. It is their pleasure 
to open for you, and their satisfaction to close with the knowledge of a job 
well done.     - Marvin _The Hitchhiker's Guide to the Galaxy_

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


Thread

Re: Bi-directional sub-process communication Cameron Simpson <cs@zip.com.au> - 2015-11-25 08:06 +1100

csiph-web