On 10/18/20, Mike Miller <python-id...@mgmiller.net> wrote: > 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-contents _______________________________________________ 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/ZN7UFUZJASVZRXP5NVMM3BXTTYRGDMXW/ Code of Conduct: http://python.org/psf/codeofconduct/