PyConsoleScreenBuffer Object

Handle to a console screen buffer Create using win32console::CreateConsoleScreenBuffer or win32console::GetStdHandle Use PyConsoleScreenBufferType(Handle) to wrap a pre-existing handle as returned by win32api::GetStdHandle. Will also accept a handle created by win32file::CreateFile for CONIN$ or CONOUT$. When an existing handle is wrapped, a copy is made using DuplicateHandle, and caller is still responsible for any cleanup of original handle.

Methods

Detach
Releases reference to handle without closing it 

Close
Closes the handle 

SetConsoleActiveScreenBuffer
Sets this handle as the currently display screen buffer 

GetConsoleCursorInfo
Retrieves size and visibility of console's cursor 

SetConsoleCursorInfo
Sets the size and visibility of console's cursor 

GetConsoleMode
Returns the input or output mode of the console buffer 

SetConsoleMode
Sets the input or output mode of the console buffer 

ReadConsole
Reads characters from the console input buffer 

WriteConsole
Writes characters at current cursor position 

FlushConsoleInputBuffer
Flush input buffer for console 

SetConsoleTextAttribute
Sets character attributes for subsequent write operations 

SetConsoleCursorPosition
Sets the console screen buffer's cursor position 

SetConsoleScreenBufferSize
Sets the size of the console screen buffer 

SetConsoleWindowInfo
Changes size and position of a console's window 

GetConsoleScreenBufferInfo
Returns the state of the screen buffer 

GetLargestConsoleWindowSize
Returns the largest possible size for the console's window 

FillConsoleOutputAttribute
Set text attributes for a consecutive series of characters 

FillConsoleOutputCharacter
Sets consecutive character positions to a specified character 

ReadConsoleOutputCharacter
Reads consecutive characters from a starting position 

ReadConsoleOutputAttribute
Retrieves attributes from consecutive character cells 

WriteConsoleOutputCharacter
Writes a string of characters at a specified position 

WriteConsoleOutputAttribute
Sets the attributes of a range of character cells 

ScrollConsoleScreenBuffer
Scrolls a region of the display 

GetCurrentConsoleFont
Returns the currently displayed font 

GetConsoleFontSize
Returns size of specified font for the console 

SetConsoleFont
Changes the font used by the screen buffer 

SetStdHandle
Replaces one of calling process's standard handles with this handle 

SetConsoleDisplayMode
Sets the display mode of the console buffer 

WriteConsoleInput
Places input records in the console's input queue 

ReadConsoleInput
Reads input records and removes them from the input queue 

PeekConsoleInput
Returns pending input records without removing them from the input queue 

GetNumberOfConsoleInputEvents
Returns the number of unread records in the input queue