#NEWLINE# def setTerminalSize( terminalFD , ws_row = 25 , ws_col = 80 , ws_xpixel = 0 , ws_ypixel = 0 ) : #NEWLINE# #INDENT# '\n    Set the size of the given PTY leader file descriptor.\n    ' #NEWLINE# structformat = '4H' #NEWLINE# data = struct . pack ( structformat , ws_row , ws_col , ws_xpixel , ws_ypixel ) #NEWLINE# fcntl . ioctl ( terminalFD , tty . TIOCSWINSZ , data )