(layer, fields)
return response
Parse the data from a response
Parse the data from a response
Parse the data from a response
def parse_response_data(layer, fields):
    """Parse the data from a response"""
    layer = layer[4:]

    response = []
    for i in xrange(fields):
        ltxt = int(layer[0], 16)
        text = ''.join(layer[1:ltxt + 1]).decode('hex')
        response.append(text)
        layer = layer[ltxt + 1:]
    return response
def parse_response_data ( layer , fields ) : layer = layer [ 4 : ] response = [ ] for i in xrange ( fields ) : ltxt = int ( layer [ 0 ] , 16 ) text = '' . join ( layer [ 1 : ltxt + 1 ] ) . decode ( 'hex' ) response . append ( text ) layer = layer [ ltxt + 1 : ] return response