def consize():
 current_os = platform.system()
 tuple_xy = None
 if (current_os == 'Windows'):
  tuple_xy = _size_windows()
 if ((current_os in ['Linux', 'Darwin']) or current_os.startswith('CYGWIN')):
  tuple_xy = _size_linux()
 return (tuple_xy or (None, None))

def consize ( ) : current_os = platform . system ( ) tuple_xy = None if ( current_os == 'Windows' ) : tuple_xy = _size_windows ( ) if ( ( current_os in [ 'Linux' , 'Darwin' ] ) or current_os . startswith ( 'CYGWIN' ) ) : tuple_xy = _size_linux ( ) return ( tuple_xy or ( None , None ) )
getterminalsize() - get width and height of console originally retrieved from: URL .