Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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.057 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; '23,': 0.16; '24,': 0.16; '9:20': 0.16; 'eof,': 0.16; 'finney': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:Line': 0.16; 'subject:Reading': 0.16; 'sudo': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'wed,': 0.18; 'thu,': 0.19; 'example': 0.22; 'creating': 0.23; '(or': 0.24; 'asking': 0.27; 'header:In-Reply-To:1': 0.27; 'correct': 0.29; 'chris': 0.29; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; "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; 'received:google.com': 0.35; 'there': 0.35; 'passwords': 0.36; 'ben': 0.38; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'read': 0.60; 'reaching': 0.61; 'mentioned': 0.61; "you're": 0.61; 'times': 0.62; 'console,': 0.84; 'subject:After': 0.84; '2013,': 0.91; 'subject:From': 0.97; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=t5P96Iu7pSXNd3YFUEz5MFhy11NZGC6Lu0Z4wJMOn7U=; b=zAGwKCJDRVibFU1FzEif+Yp/wqLJXQncOL3YxdJgpfd4Tub+nOCWS92xShxudUjLMo KkHsUzo2zP5kkCKzBbX5+YZmuSp6xiTrReAbZaqrHM8vulWKerpmrWjhG4W6aeSqEGSG Mw+YiZfUuh5ey6zQZwkSHVwAUmBCryJbDZjzJEpTdPml87Q4SdQykBHk/tD6vETE7iba d7mf+ik9tn6GEOe2z9b6o3mCXKVsGxl5x/vJTRP2u6aLrYaTJCEh0sZuwD+/ETHixXJ5 MIYpkjnHc2SUns0LHLefEdmad4FnMJ8OVMCFJbqklGwSR7gnSWWUyrvCkMNuGvHbCsEk WHLQ== MIME-Version: 1.0 X-Received: by 10.68.135.100 with SMTP id pr4mr4002465pbb.62.1382567037895; Wed, 23 Oct 2013 15:23:57 -0700 (PDT) In-Reply-To: <7wfvrreijs.fsf@benfinney.id.au> References: <7cdlja-j3j2.ln1@ozzie.tundraware.com> <7wli1jemvg.fsf@benfinney.id.au> <1382562096.2967.37713425.4901765B@webmail.messagingengine.com> <7wfvrreijs.fsf@benfinney.id.au> Date: Thu, 24 Oct 2013 09:23:57 +1100 Subject: Re: Reading From stdin After Command Line Redirection From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382567040 news.xs4all.nl 15885 [2001:888:2000:d::a6]:52794 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57391 On Thu, Oct 24, 2013 at 9:20 AM, Ben Finney wrote: > 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. The OP did say "tty" and mentioned getpass. ChrisA