[Tutor] Wondering if there is a print in location command for terminal?

eryksun eryksun at gmail.com
Tue Feb 10 04:48:35 CET 2015


On Mon, Feb 9, 2015 at 6:40 PM, Alan Gauld <alan.gauld at btinternet.com> wrote:
>
> Yes curses is probably the best fit here. It doesn't work
> so well on Windows but on Linux/MacOS it does a good job.

curses for Windows (based on PDCurses):
http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses

> There are some other library packages that emulate the
> old DOS conio package and include x/y coordinate location,

The msvcrt module wraps the conio functions kbhit, getch, getche,
ungetch, and putch (plus the [w]ide alternatives).

> but they often require ANSI.SYS or similar to be installed.

That's the old-school DOS driver. For Windows try ANSICON. It injects
ANSI32.DLL or ANSI64.DLL to hook WriteConsole and WriteFile.

https://github.com/adoxa/ansicon


More information about the Tutor mailing list