[Tutor] Best Python 3 module to create simple text editor in Windows command prompt?
Alan Gauld
alan.gauld at yahoo.co.uk
Fri Feb 3 05:47:44 EST 2017
On 03/02/17 04:42, boB Stepp wrote:
> On Thu, Feb 2, 2017 at 8:35 PM, eryk sun <eryksun at gmail.com> wrote:
>>>
>> Try using curses [1]. Christoph Gohlke has a port for Windows Python
>> based on the PDCurses library [2].
>
> Thanks, Eryk. I did not realize that curses had been ported to
> Windows. I thought it was for *nix only.
There have been several attempts at a Python curses for "DOS"
over the years but none of them worked completely (except
the Cygwin version of course*). I haven't tried the one
that Eryk suggests, hopefully somebody finally got it working.
Should that fail, or be overly complex, there are several
terminal control libraries around, and if all else fails
there are the so called "High Level Console Functions"
in the Microsoft API:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682010(v=vs.85).aspx
These should be accessible using ctypes if you are really
stuck... They are not very "high level" though!
(*) If you are just doing this for personal use then I
strongly suggest installing cygwin and just running
Python there. By far the simplest way to get a decent
console on Windows and all the other *nix tools as well.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list