将hex转换为bytes

def get_head_bytes(data_len,type_name):
    header_bytes =b''

    head_bytes =  struct.pack(' 
 

你可能感兴趣的:(python)