Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed5.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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'frameworks': 0.05; 'memory.': 0.05; 'correct.': 0.07; 'nasty': 0.07; 'python': 0.09; 'thread,': 0.09; 'cc:addr:python-list': 0.10; 'anyway': 0.11; 'pipes': 0.16; 'processes.': 0.16; 'return,': 0.16; 'module': 0.19; 'sorry,': 0.22; 'cc:2**0': 0.23; 'seems': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'wrote': 0.26; 'run': 0.28; 'servers.': 0.29; 'surprised': 0.29; 'usually': 0.30; 'worked': 0.30; 'code': 0.31; 'running': 0.32; 'subject:data': 0.33; 'another': 0.33; "can't": 0.34; 'process,': 0.35; 'expected': 0.35; 'there': 0.35; 'except': 0.36; 'but': 0.36; 'child': 0.36; 'option': 0.37; 'communicate': 0.37; 'subject:: ': 0.38; 'things': 0.38; 'instead': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'think': 0.40; 'your': 0.60; 'most': 0.61; 'between': 0.63; 'effective': 0.63; 'more': 0.63; 'talking': 0.66; 'received:204': 0.72; 'child,': 0.84 Date: Wed, 01 Aug 2012 10:19:19 +0200 From: Laszlo Nagy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: andrea crotti Subject: Re: Pass data to a subprocess References: <5017EFB0.6080608@shopzeus.com> 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.12 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1343809166 news.xs4all.nl 6854 [2001:888:2000:d::a6]:50583 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:26339 > > As I wrote "I found many nice things (Pipe, Manager and so on), but > actually even > this seems to work:" yes I did read the documentation. Sorry, I did not want be offensive. > > I was just surprised that it worked better than I expected even > without Pipes and Queues, but now I understand why.. > > Anyway now I would like to be able to detach subprocesses to avoid the > nasty code reloading that I was talking about in another thread, but > things get more tricky, because I can't use queues and pipes to > communicate with a running process that it's noit my child, correct? > Yes, I think that is correct. Instead of detaching a child process, you can create independent processes and use other frameworks for IPC. For example, Pyro. It is not as effective as multiprocessing.Queue, but in return, you will have the option to run your service across multiple servers. The most effective IPC is usually through shared memory. But there is no OS independent standard Python module that can communicate over shared memory. Except multiprocessing of course, but AFAIK it can only be used to communicate between fork()-ed processes.