def get_console_screen_buffer_info(fd=1):
 hcon = STDHANDLES[fd]
 csbi = CONSOLE_SCREEN_BUFFER_INFO()
 GetConsoleScreenBufferInfo(hcon, byref(csbi))
 return csbi

def get_console_screen_buffer_info ( fd = 1 ) : hcon = STDHANDLES [ fd ] csbi = CONSOLE_SCREEN_BUFFER_INFO ( ) GetConsoleScreenBufferInfo ( hcon , byref ( csbi ) ) return csbi
returns an screen buffer info object for the relevant stdbuf .