def naws(self, data):
        """
        Received NAWS. (Window dimensions.)
        """
        if len(data) == 4:
            # NOTE: the first parameter of struct.unpack should be
            # a 'str' object. Both on Py2/py3. This crashes on OSX
            # otherwise.
            columns, rows = struct.unpack(str('!HH'), data)
            self.size_received_callback(rows, columns)
        else:
            logger.warning('Wrong number of NAWS bytes')
def naws ( self , data ) : if len ( data ) == 4 : columns , rows = struct . unpack ( str ( '!HH' ) , data ) self . size_received_callback ( rows , columns ) else : logger . warning ( 'Wrong number of NAWS bytes' )
Received NAWS. (Window dimensions.)