Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.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.013 X-Spam-Evidence: '*H*': 0.97; '*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:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'reedy': 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; 'am,': 0.29; 'tim': 0.29; 'unix': 0.29; "doesn't": 0.30; 'said,': 0.30; 'message-id:@mail.gmail.com': 0.30; 'chase': 0.31; "can't": 0.35; 'done.': 0.35; 'received:google.com': 0.35; 'though,': 0.39; 'tell': 0.60; "you're": 0.61; 'jul': 0.74; 'canonical': 0.91; 'to:none': 0.92 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:cc :content-type; bh=K678aa2YA6rkBGJGdcgKbz4sISsLlXklQenB9WYBE6Y=; b=VRUJKdpSAZAKggaMlVeyfotOrD5GaEdKFrGpqpIVrDh0MSw5J3cSow9QRHvpmYkohE 564Be1PMlwdq0niA0NPlcvwI5hMZ3dB23sK3ZXGoK7tXY6GDQ/VcgAfJ8aqG8iTkl3xU aEyQYxNwyq/B3Ah3JXCzU+waNRRD1Ap4P+dGWa5OGnj2MvuQF4oWYLlH0qzxBJRlcO0s HFx08nZkt07ekQkFD9NgjCETWLOrY3sAyuMIisJKJadbMuZBs1w2cjmbpjyvNGj5mnAr 0dqZf8WDFsa19QoRdhCTkxGZnkH5atly2+pEDPSOvUsOBy/zy1Deo4VpQpWejZFPL/9A PntA== MIME-Version: 1.0 X-Received: by 10.58.216.4 with SMTP id om4mr755020vec.66.1404833083371; Tue, 08 Jul 2014 08:24:43 -0700 (PDT) In-Reply-To: <20140708102033.13efb3a4@bigbox.christie.dr> References: <53ba11fc$0$29985$c3e8da3$5496439d@news.astraweb.com> <53ba538d$0$2926$c3e8da3$76491128@news.astraweb.com> <20140708102033.13efb3a4@bigbox.christie.dr> Date: Wed, 9 Jul 2014 01:24:43 +1000 Subject: Re: open() and EOFError From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 1404833092 news.xs4all.nl 2851 [2001:888:2000:d::a6]:37311 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:74174 On Wed, Jul 9, 2014 at 1:20 AM, Tim Chase wrote: > On 2014-07-08 11:08, Terry Reedy wrote: >> > Indeed. Ctrl-D is _the_ canonical way to tell a program that's >> > reading stdin that your're done. >> >> Not on Windows. > > 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. ChrisA