Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:text': 0.05; 'subject:Python': 0.06; '64-bit': 0.07; '32-bit': 0.09; 'function,': 0.09; 'subject:editor': 0.09; 'whatever.': 0.09; 'works.': 0.09; 'itself.': 0.14; 'windows': 0.15; '(it': 0.16; '-tkc': 0.16; 'exists,': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'wrote:': 0.18; 'not,': 0.20; 'file.': 0.24; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; '[1]': 0.29; "doesn't": 0.30; '[2]': 0.30; 'dos': 0.30; 'url:wiki': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'url:wikipedia': 0.31; 'older': 0.33; 'subject:with': 0.35; 'basic': 0.35; "can't": 0.35; 'something': 0.35; 'editor': 0.35; 'but': 0.35; 'version': 0.36; 'entry': 0.36; 'charset:us-ascii': 0.36; 'url:org': 0.36; 'detail': 0.37; 'application': 0.37; 'skip:[ 10': 0.38; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'either': 0.39; 'according': 0.40; 'even': 0.60; 'read': 0.60; 'gone': 0.61; 'back': 0.62; 'believe': 0.68; 'received:50.22': 0.84 Date: Mon, 1 Sep 2014 15:06:04 -0500 From: Tim Chase To: python-list@python.org Subject: Re: Editing text with an external editor in Python In-Reply-To: <5404b987$0$30001$c3e8da3$5496439d@news.astraweb.com> References: <54049ab7$0$29972$c3e8da3$5496439d@news.astraweb.com> <5404b987$0$30001$c3e8da3$5496439d@news.astraweb.com> 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 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1409602073 news.xs4all.nl 2834 [2001:888:2000:d::a6]:54686 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77414 On 2014-09-02 04:23, Steven D'Aprano wrote: > Read $VISUAL, if it exists, otherwise $EDITOR, if it exists, > otherwise fall back on something hard coded. Or read it from an ini > file. Or create an entry in the register. Whatever. That's up to > the application which uses this function, not the function itself. > > Under XP and older the standard DOS editor is EDIT, but that's gone > from Windows 7. Believe it or not, I understand that you can use: > > copy con [filename.???] > > to do basic line editing, which is terrifying, but I believe it > works. And according to [1], the venerable edlin is still available on Win8, even if you don't have edit. Though according to [2], it sounds like MS-EDIT is still available on at least the 32-bit version of Win8 (it doesn't detail whether it comes out of the box on 64-bit Win8). I don't have Win8, so I can't corroborate either application. -tkc [1] http://en.wikipedia.org/wiki/Edlin#History [2] http://en.wikipedia.org/wiki/MS-DOS_Editor