18 Oct
2020
18 Oct
'20
7:47 p.m.
On 10/18/20, Mike Miller
On 2020-10-17 17:05, Eryk Sun wrote:
CMD's CLS is implemented with three API calls: GetConsoleScreenBufferInfo to get the screen-buffer dimensions and default text attributes, ScrollConsoleScreenBufferW to shift the buffer out, and SetConsoleCursorPosition to move the cursor to (0,0).
Would you happen to have a link to some Python/ctypes code to implement this?
I would expect this to be implemented in posixmodule.c, not via ctypes. I can help with the implementation in C. Read the following pages in the console docs, if you haven't already: https://docs.microsoft.com/en-us/windows/console/scrolling-the-screen-buffer https://docs.microsoft.com/en-us/windows/console/scrolling-a-screen-buffer-s...