Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104554
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Other difference with Perl: Python scripts in a pipe |
| Date | Thu, 10 Mar 2016 14:46:50 -0700 |
| Lines | 24 |
| Message-ID | <mailman.157.1457646452.15725.python-list@python.org> (permalink) |
| References | <nbsp83$2p1$1@gioia.aioe.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de vyvUWT5UcBI6jRFCygwslQlyJwTycPMuwUhRdGPM7Syg== |
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.006 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'received:209.85.223': 0.03; 'subject:Python': 0.05; 'python3': 0.05; 'sys': 0.05; 'python': 0.10; 'thu,': 0.15; '2016': 0.16; 'range(20):': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'commands,': 0.22; 'pipe': 0.22; 'import': 0.24; 'header:In-Reply- To:1': 0.24; 'script': 0.25; 'message-id:@mail.gmail.com': 0.27; 'cat': 0.29; 'doing?': 0.29; 'this?': 0.34; 'received:google.com': 0.35; 'problem.': 0.35; 'received:209.85': 0.36; 'to:addr:python- list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'to:addr:python.org': 0.40; 'subject:with': 0.40; 'your': 0.60; 'avoid': 0.61; 'mar': 0.65; 'to:name:python': 0.84; 'refuse': 0.93 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=tBf2xUWoSZBp/RDdvmiARr1+hOA96DOHlkCU09gkX/c=; b=AksCWqTU2AiOHGoMXYQXeCs9m6lLnDkjerRYMuCIWq4DQQ66ToSqb37GJYse5zVM8w Vg/z4gHE1SSt99GWNM1a/+dSgZRlSLRe8VxAkho0BzzWuJ/pqgZUaX+novJBdx1vVYbG vZfOzrQL0eqVqAT7JaDA0VIOCoaUyFddIweuIEGqs9+OUMq5nHN/yc/+3NCSlo7j4sun SUtAGuYKZCLf5dn6uiZw0qXKgmqu2Ob0kAFO+cCqu6nEVJMkDM/9n4pWssOvg9uJIMF7 B1+ovsM+uRokIsshkl39BFRUyLXyV4e/AFTyoiCgCwgVCFOaGLoXgqlK8xdG5JGTWtG8 gn0w== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=tBf2xUWoSZBp/RDdvmiARr1+hOA96DOHlkCU09gkX/c=; b=ECDFJ6VizTV+EJOZlrlIuifBT/V8uW/8ObLjbGmm2akJV9uwozEV6mC0tJZh1zkV67 D0Kil70DU/KRH1UL6UgFy+i6C6kWRD01q8LGr+fMqBVTmiO2ASU6Hh7n8ZaOlpletvVq 9xfj5epi3Gb7SEL7rNif4Pr1rjBlU1snbJewp1vkyNgqPmSONEJtCDE4hxRg4KgNtIu9 ENH6Lw93b+vtuH4gtbE0GGxul88d1ewBv7DTDZ3QixuxOY6NRuoAwJAIV+ywCyzHKzWa qh+q6pe5xebPsuD49OdG4NJZr4XWZeZQe+7A+MEaWU4S9AZ6BdgZ3erteWxDQ2s69+zd Pdpw== |
| X-Gm-Message-State | AD7BkJJhggVq01WuD3KgV6VQX8P8Zf8oyAH5NMslMEwjrM8e+2GecTWaead0yYN/oXpr/sGW3tKKuSMLIslZeg== |
| X-Received | by 10.107.11.148 with SMTP id 20mr6170642iol.111.1457646449466; Thu, 10 Mar 2016 13:47:29 -0800 (PST) |
| In-Reply-To | <nbsp83$2p1$1@gioia.aioe.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21 |
| 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:104554 |
Show key headers only | View raw
On Thu, Mar 10, 2016 at 2:33 PM, Fillmore <fillmore_remove@hotmail.com> wrote:
>
> when I put a Python script in pipe with other commands, it will refuse to
> let go silently. Any way I can avoid this?
What is your script doing? I don't see this problem.
ikelly@queso:~ $ cat somescript.py
import sys
for i in range(20):
sys.stdout.write('line %d\n' % i)
ikelly@queso:~ $ python somescript.py | head -5
line 0
line 1
line 2
line 3
line 4
ikelly@queso:~ $ python3 somescript.py | head -5
line 0
line 1
line 2
line 3
line 4
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Other difference with Perl: Python scripts in a pipe Fillmore <fillmore_remove@hotmail.com> - 2016-03-10 16:33 -0500
Re: Other difference with Perl: Python scripts in a pipe Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-10 14:46 -0700
Re: Other difference with Perl: Python scripts in a pipe Fillmore <fillmore_remove@hotmail.com> - 2016-03-10 17:04 -0500
Re: Other difference with Perl: Python scripts in a pipe Peter Otten <__peter__@web.de> - 2016-03-10 23:09 +0100
Re: Other difference with Perl: Python scripts in a pipe Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-10 15:16 -0700
Re: Other difference with Perl: Python scripts in a pipe Fillmore <fillmore_remove@hotmail.com> - 2016-03-10 18:48 -0500
Re: Other difference with Perl: Python scripts in a pipe INADA Naoki <songofacandy@gmail.com> - 2016-03-11 09:08 +0900
Re: Other difference with Perl: Python scripts in a pipe Fillmore <fillmore_remove@hotmail.com> - 2016-03-10 19:26 -0500
Re: Other difference with Perl: Python scripts in a pipe Alan Bawden <alan@csail.mit.edu> - 2016-03-11 01:45 -0500
Re: Other difference with Perl: Python scripts in a pipe Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-03-11 12:15 +0200
Re: Other difference with Perl: Python scripts in a pipe Ethan Furman <ethan@stoneleaf.us> - 2016-03-11 00:55 -0800
csiph-web