(self)
Clear the screen.
Clear the screen.
Clear the screen .
def clear(self):
        """Clear the screen."""
        csbi = GetConsoleScreenBufferInfo(self._hstdout)
        # fill the entire screen with blanks
        FillConsoleOutputCharacter(
            self._hstdout, u' ', csbi.dwSize.X * csbi.dwSize.Y, wintypes._COORD(0, 0)
        )
        # now set the buffer's attributes accordingly
        FillConsoleOutputAttribute(
            self._hstdout, self._attrs, csbi.dwSize.X * csbi.dwSize.Y, wintypes._COORD(0, 0)
        )
        _SetConsoleCursorPosition(self._hstdout, wintypes._COORD(0, 0))
def clear ( self ) : csbi = GetConsoleScreenBufferInfo ( self . _hstdout ) # fill the entire screen with blanks FillConsoleOutputCharacter ( self . _hstdout , u' ' , csbi . dwSize . X * csbi . dwSize . Y , wintypes . _COORD ( 0 , 0 ) ) # now set the buffer's attributes accordingly FillConsoleOutputAttribute ( self . _hstdout , self . _attrs , csbi . dwSize . X * csbi . dwSize . Y , wintypes . _COORD ( 0 , 0 ) ) _SetConsoleCursorPosition ( self . _hstdout , wintypes . _COORD ( 0 , 0 ) )