Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #108154
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Terry Reedy <tjreedy@udel.edu> |
| Newsgroups | comp.lang.python |
| Subject | Re: Interacting with Subprocesses |
| Date | Wed, 4 May 2016 20:33:56 -0400 |
| Lines | 22 |
| Message-ID | <mailman.393.1462408447.32212.python-list@python.org> (permalink) |
| References | <MPG.3193e21979405e40989683@news.supernews.com> <nge4dn$r4b$1@ger.gmane.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de dVIbKX+UiFAAEj+J4Smx5gJknWdO6RpsyA7fSLP2ZDdA== |
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.019 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'jan': 0.11; 'pair,': 0.16; 'pairs': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'wrote:': 0.16; 'seems': 0.23; 'tried': 0.24; 'header:In-Reply-To:1': 0.24; 'feature': 0.24; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'this.': 0.28; 'attempting': 0.29; 'dialog': 0.29; 'initiate': 0.29; "i'm": 0.30; 'code': 0.30; "can't": 0.32; 'continuing': 0.32; 'returned': 0.32; 'run': 0.33; 'problem': 0.33; 'source': 0.33; 'true.': 0.33; 'execution': 0.35; 'interact': 0.35; 'protocol': 0.35; 'but': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'sure': 0.39; 'to:addr:python.org': 0.40; 'subject:with': 0.40; 'some': 0.40; 'skip:u 10': 0.61; 'programs': 0.62; 'received:96': 0.63; 'between': 0.65; 'communicate,': 0.84; 'medium.': 0.91; 'received:fios.verizon.net': 0.91; 'responses': 0.93 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| X-Gmane-NNTP-Posting-Host | pool-96-227-207-81.phlapa.fios.verizon.net |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
| In-Reply-To | <MPG.3193e21979405e40989683@news.supernews.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.22 |
| 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> |
| X-Mailman-Original-Message-ID | <nge4dn$r4b$1@ger.gmane.org> |
| X-Mailman-Original-References | <MPG.3193e21979405e40989683@news.supernews.com> |
| Xref | csiph.com comp.lang.python:108154 |
Show key headers only | View raw
On 5/4/2016 2:41 PM, Dick Holmes wrote: > I am attempting to write a Python program that will interact with > a (non-Python) process. The programs will run under MinGW. The > process can use stdin/stdout commands and responses and can work > with pipes. The problem I'm having is that I can't find any > way in Python to have a continuing dialog with the process. I > have tried Popen communicate, but that protocol seems to be > limited to a single message/response pair, and the response > is not returned to the message originator until the process > terminates. Unfortunately I don't have access to the process' > source code so I can't change the communication medium. > > Is there some feature that will allow me to initiate the process > and execute multiple message/response pairs between the Python > program and the process during a single execution of the process? I have been told that multiprocessing works better for this. Not sure is true. -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Interacting with Subprocesses Dick Holmes <encore1@cox.net> - 2016-05-04 11:41 -0700 Re: Interacting with Subprocesses Akira Li <4kir4.1i@gmail.com> - 2016-05-05 00:04 +0300 Re: Interacting with Subprocesses Terry Reedy <tjreedy@udel.edu> - 2016-05-04 20:33 -0400 Re: Interacting with Subprocesses Akira Li <4kir4.1i@gmail.com> - 2016-05-05 04:05 +0300 Re: Interacting with Subprocesses eryk sun <eryksun@gmail.com> - 2016-05-05 04:38 -0500
csiph-web