Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'convention.': 0.07; 'cc:addr:python-list': 0.11; 'windows': 0.15; '-tkc': 0.16; 'command-line': 0.16; 'eof': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'all,': 0.19; 'platforms': 0.22; 'cc:addr:python.org': 0.22; 'tend': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'tim': 0.29; 'unix': 0.29; "doesn't": 0.30; 'said,': 0.30; 'chase': 0.31; 'file': 0.32; "can't": 0.35; 'done.': 0.35; 'there': 0.35; 'charset:us-ascii': 0.36; 'basis.': 0.38; 'though,': 0.39; 'tell': 0.60; "you're": 0.61; 'to:addr:gmail.com': 0.65; 'life': 0.66; 'jul': 0.74; 'received:50.22': 0.84; 'canonical': 0.91 Date: Tue, 8 Jul 2014 10:46:35 -0500 From: Tim Chase To: Chris Angelico Subject: Re: open() and EOFError In-Reply-To: References: <53ba11fc$0$29985$c3e8da3$5496439d@news.astraweb.com> <53ba538d$0$2926$c3e8da3$76491128@news.astraweb.com> <20140708102033.13efb3a4@bigbox.christie.dr> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: authenticated_id: tim@thechases.com Cc: "python-list@python.org" 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1404834458 news.xs4all.nl 2865 [2001:888:2000:d::a6]:50719 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:74177 On 2014-07-09 01:24, Chris Angelico wrote: > On Wed, Jul 9, 2014 at 1:20 AM, Tim Chase > > Okay, EOF is the canonical way to tell a program reading stdin > > that you're done. It just happens that EOF ^D on *nix-likes and > > ^Z on Win32. :-) > > > > -tkc > > I can't think of any Windows-native programs that ask for EOF. Only > those which came from POSIX platforms do it. That said, though, > Windows doesn't tend to encourage interactive command-line programs > at all, so you may as well just follow the Unix convention. There was a time in life where I used "copy con output.txt" on a disturbingly frequent basis. Control+Z ended my file for me. -tkc