#NEWLINE# def get_tty_width( ) : #NEWLINE# #INDENT# tty_size = os . popen ( 'stty size' , 'r' ) . read ( ) . split ( ) #NEWLINE# if ( len ( tty_size ) != 2 ) : #NEWLINE# #INDENT# return 0 #NEWLINE# #UNINDENT# ( _ , width ) = tty_size #NEWLINE# return int ( width )