#NEWLINE# def _possible_grids( self , num_windows ) : #NEWLINE# #INDENT# '\n        iterates over possible grids given a number of windows\n        ' #NEWLINE# if ( num_windows < 2 ) : #NEWLINE# #INDENT# end = 2 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# end = ( ( num_windows // 2 ) + 1 ) #NEWLINE# #UNINDENT# for rows in range ( 1 , end ) : #NEWLINE# #INDENT# cols = int ( math . ceil ( ( num_windows / rows ) ) ) #NEWLINE# ( yield ( rows , cols , ROWCOL ) ) #NEWLINE# if ( rows != cols ) : #NEWLINE# #INDENT# ( yield ( end , rows , COLROW ) )