Commit ebbc5838 刘韬

1

1 个父辈 8a3ff8e2
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "app",
"FLASK_ENV": "development"
},
"args": [
"run",
"--no-debugger"
],
"jinja": true
}
]
}
\ No newline at end of file \ No newline at end of file
cd smartshelf
flask run -p 5000 -h 0.0.0.0
\ No newline at end of file \ No newline at end of file
...@@ -29,27 +29,27 @@ def production_filter(origin_value): ...@@ -29,27 +29,27 @@ def production_filter(origin_value):
return cur_dict return cur_dict
def transfer(origin_value): def transfer(origin_value):
cur_dict = {} cur_dict = {}
if origin_value: if origin_value:
# receive_data=origin_value.split("\n") # receive_data=origin_value.split("\n")
receive_data=origin_value.decode().split("\r\n") receive_data=origin_value.decode().split("\r\n")
for item in receive_data[::-1]: for item in receive_data[::-1]:
if not (item.startswith("A") and item.endswith("]")): if not (item.startswith("A") and item.endswith("]")):
receive_data.remove(item) receive_data.remove(item)
print (item) print (item)
print("筛选后的数据:", receive_data) print("筛选后的数据:", receive_data)
if receive_data: if receive_data:
for line in receive_data: for line in receive_data:
# print ("-----------------line",line) # print ("-----------------line",line)
addr = re.search("(?<=A)\d+",line) addr = re.search("(?<=A)\d+",line)
led = re.search("\[.*?\]", line) led = re.search("\[.*?\]", line)
c_list = list(led.group()) c_list = list(led.group())
# print ("-------------------c_list",c_list) # print ("-------------------c_list",c_list)
c_list.pop(0) c_list.pop(0)
c_list.pop(-1) c_list.pop(-1)
keyword = 'A' + addr.group() keyword = 'A' + addr.group()
cur_dict[keyword] = c_list cur_dict[keyword] = c_list
return cur_dict return cur_dict
def change_deatil(old_dict): def change_deatil(old_dict):
global s_detail global s_detail
......
off
\ No newline at end of file \ No newline at end of file
on
\ No newline at end of file \ No newline at end of file
Binary files a/smartshelf/logs/log and b/smartshelf/logs/log differ Binary files a/smartshelf/logs/log and b/smartshelf/logs/log differ
此文件的差异太大,无法显示。
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!