On 12/20/20, Cameron Simpson <c...@cskk.id.au> wrote: > On 20Dec2020 15:48, Christopher Barker <python...@gmail.com> wrote: > >>That would be great, though I just looked at the 3.9 docs and saw: >>"The Windows version of Python doesn’t include the curses module." > > Yeah, Windows.
A C or ctypes implementation is required in Windows. Virtual terminal mode is supported in Windows 10, for which it *might* be enabled. This can be queried via GetConsoleMode. If virtual terminal mode isn't enabled, then clearing the screen has to be implemented by scrolling the console screen buffer. The screen buffer size, visible rectangle, and current character attributes can be queried via GetConsoleScreenBufferInfo. The window can be scrolled via ScrollConsoleScreenBuffer. The entire buffer can be scrolled out, like the CMD shell's CLS command, or one can just scroll the buffer enough to clear the visible window. The cursor can be set to the home position via SetConsoleCursorPosition. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/MRU5G2IB4CBSK5TAWKHS7EXIV6ECBEKO/ Code of Conduct: http://python.org/psf/codeofconduct/