import prottcp # s1="左侧到位检测失败" # s2="左侧请求三码数据失败" # s3="左侧赋码失败" # s5="右侧到位检测失败" # s6="右侧请求三码数据失败" # s7="右侧赋码失败" # print('{0x'+s1.encode('utf-8').hex(' ').replace(' ',',0x')+'},') # print('{0x'+s2.encode('utf-8').hex(' ').replace(' ',',0x')+'},') # print('{0x'+s3.encode('utf-8').hex(' ').replace(' ',',0x')+'},') # print('{0x'+s5.encode('utf-8').hex(' ').replace(' ',',0x')+'},') # print('{0x'+s6.encode('utf-8').hex(' ').replace(' ',',0x')+'},') # print('{0x'+s7.encode('utf-8').hex(' ').replace(' ',',0x')+'},') def main(): port= if __name__ == '__main__': main()