Commit fca58595 by hank

修改py

parent 66c11f8f
......@@ -31,8 +31,14 @@ def sendMessage(path, message):
args = parser.parse_args()
client = udp_client.SimpleUDPClient(args.ip, args.port)
print(path, message)
client.send_message(path, json.dumps(message))
print(path.encode('unicode_escape'), message)
print(('BEUC' + path).encode('unicode_escape'), message)
str = ('BEUC' + path).encode('unicode_escape').decode('utf-8')
print('BEUC' + path, str)
print(str.encode('unicode_escape')[0], str.encode('unicode_escape')[1], str.encode('unicode_escape')[2], str.encode('unicode_escape')[3], str.encode('unicode_escape')[4])
client.send_message(str, json.dumps(message))
# error action
......
......@@ -34,4 +34,14 @@ function* helloWorldGenerator() {
}
var hw = helloWorldGenerator();
console.log(hw.next(),hw.next(),hw.next(),hw.next())
\ No newline at end of file
console.log(hw.next(),hw.next(),hw.next(),hw.next())
// import logging
// logging.basicConfig(level=logging.DEBUG,#控制台打印的日志级别
// filename='log_new.log', # 将日志写入log_new.log文件中
// filemode='a',##模式,有w和a,w就是写模式,每次都会重新写日志,覆盖之前的日志
// #a是追加模式,默认如果不写的话,就是追加模式
// format=
// '%(asctime)s - %(pathname)s[line:%(lineno)d] - %(levelname)s: %(message)s'
// #日志格式
// )
复制代码
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment