Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'think,': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '23,': 0.16; 'eof,': 0.16; 'finney': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:Line': 0.16; 'subject:Reading': 0.16; 'sudo': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'wed,': 0.18; 'example': 0.22; 'creating': 0.23; 'header :User-Agent:1': 0.23; '(or': 0.24; 'asking': 0.27; 'header:X -Complaints-To:1': 0.27; 'correct': 0.29; 'chris': 0.29; "i'm": 0.30; 'writes:': 0.31; 'allows': 0.31; 'file': 0.32; 'this.': 0.32; 'another': 0.32; 'text': 0.33; 'sense': 0.34; 'editor': 0.35; 'there': 0.35; 'passwords': 0.36; 'ben': 0.38; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'reaching': 0.61; "you're": 0.61; 'times': 0.62; 'believe': 0.68; 'console,': 0.84; 'subject:After': 0.84; 'upset': 0.84; '2013,': 0.91; 'subject:From': 0.97 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: Reading From stdin After Command Line Redirection Date: Thu, 24 Oct 2013 09:20:07 +1100 References: <7cdlja-j3j2.ln1@ozzie.tundraware.com> <7wli1jemvg.fsf@benfinney.id.au> <1382562096.2967.37713425.4901765B@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: rasputin.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-gpg.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:ztva1KBYAaaHIzDbZ4wX6z5Tk50= 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382566824 news.xs4all.nl 15939 [2001:888:2000:d::a6]:49980 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57390 random832@fastmail.us writes: > On Wed, Oct 23, 2013, at 16:52, Chris Angelico wrote: > > There are times when this is correct behaviour - like asking for > > passwords (SSH and sudo work like this). > > Less (or pagers generally, or an interactive text editor that allows > creating a file from standard input) would be another example of a > program where it makes sense to do this. You're both describing programs that read the console, which is not what the OP was asking for. The OP was asking about re-opening stdin after reaching EOF, which is incoherent as far as I understand it. I'm still waiting for the OP to clarify what they want to do. -- \ “Broken promises don't upset me. I just think, why did they | `\ believe me?” —Jack Handey | _o__) | Ben Finney