Editing text with an external editor in Python

Tim Chase python.list at tim.thechases.com
Mon Sep 1 22:06:04 CEST 2014

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.


[1] http://en.wikipedia.org/wiki/Edlin#History
[2] http://en.wikipedia.org/wiki/MS-DOS_Editor

More information about the Python-list mailing list