Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.06; 'abstraction': 0.09; 'e.g.,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'stderr': 0.16; 'stdout': 0.16; 'tty': 0.16; 'uniq': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'command': 0.22; 'otherwise,': 0.22; 'header:User-Agent:1': 0.23; 'connected': 0.24; 'sort': 0.25; 'header:X-Complaints-To:1': 0.27; 'idea': 0.28; '+0100,': 0.31; "d'aprano": 0.31; 'pipe': 0.31; 'remotely': 0.31; 'steven': 0.31; 'subject:some': 0.31; 'writes:': 0.31; 'extend': 0.32; 'interface': 0.32; 'mac': 0.33; 'but': 0.35; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'url:12': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'read': 0.60; 'become': 0.64; 'detail.': 0.68; 'useful.': 0.68; 'url:2011': 0.75; 'console,': 0.84; 'received:89': 0.85; 'pipeline': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Akira Li <4kir4.1i@gmail.com> Subject: Re: Python 3.2 has some deadly infection Date: Thu, 05 Jun 2014 06:49:09 +0400 References: <538a8f48$0$29978$c3e8da3$5496439d@news.astraweb.com> <538bcfff$0$29978$c3e8da3$5496439d@news.astraweb.com> <538C5BB8.1020702@chamonix.reportlab.co.uk> <538f1a61$0$29978$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain X-Gmane-NNTP-Posting-Host: 89.169.229.68 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:LegNnrJUaRhOy6S3QuES0pw1xLU= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401936565 news.xs4all.nl 2894 [2001:888:2000:d::a6]:56541 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72671 Steven D'Aprano writes: > On Tue, 03 Jun 2014 15:18:19 +0100, Robin Becker wrote: > >> Isn't it a bit old fashioned to think everything is connected to a >> console? > > The whole concept of stdin and stdout is based on the idea of having a > console to read from and write to. Otherwise, what would be the point? > Classic Mac (pre OS X) had no command line interface nothing, and nothing > even remotely like stdin and stdout. But once you have a console, stdin, > stdout, and stderr become useful. And once you have them, then you can > extend the concept using redirection and pipes. But fundamentally, stdin > and stdout are about consoles. > We can consider "pipes" abstraction to be fundumental. Decades of usage prove a pipeline of processes usefulness e.g., tr -cs A-Za-z '\n' | tr A-Z a-z | sort | uniq -c | sort -rn | sed ${1}q See http://www.leancrew.com/all-this/2011/12/more-shell-less-egg/ Whether or not a pipe is connected to a tty is a small detail. stdin/stdout is about pipes, not consoles. -- akira