Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Cameron Simpson Newsgroups: comp.lang.python Subject: Re: Bi-directional sub-process communication Date: Tue, 24 Nov 2015 16:29:05 +1100 Lines: 16 Message-ID: References: <20151124052512.GA51713@cskk.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Trace: news.uni-berlin.de a6qQI1Zl668peS6IV+8CMQNwYs8Bozu2wMSmbqFSkyVA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:skip:c 10': 0.07; 'cc:addr:python-list': 0.09; "ain't": 0.09; 'subject:process': 0.09; 'def': 0.13; '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; 'wrote:': 0.16; 'cc:addr:python.org': 0.20; 'fix': 0.21; 'cc:2**1': 0.22; 'cheers,': 0.22; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'example': 0.26; 'code:': 0.29; "can't": 0.32; 'skip:_ 10': 0.32; 'class': 0.33; 'received:com.au': 0.33; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'subject:-': 0.39; 'cameron': 0.66 Content-Disposition: inline In-Reply-To: <20151124052512.GA51713@cskk.homeip.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=R6/+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=_8SYgF1r9Vnpn2GF0fkA:9 a=CjuIK1q_8ugA:10 a=OMXELGCZQLQA: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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:99294 On 24Nov2015 16:25, Cameron Simpson wrote: >Completely untested example code: > > class ReturnEvent: > def __init__(self): > self.event = Event() With, of course: def wait(self): return self.event.wait() Cheers, Cameron Simpson Maintainer's Motto: If we can't fix it, it ain't broke.