This commit is contained in:
JIAKUNHAO 2022-11-24 17:21:42 +08:00
parent f68f33cd34
commit 2314b931b5

View File

@ -77,7 +77,8 @@ manager = WebsocketUtil()
def write(id: str, ws: List):
print(f"序列化对象{ws}")
with open(f"{id}.pkl", "wb") as f:
wsdump = pickle.dump(ws, f)
pickle.dump(ws, f)
f.close()
def read(id: str):
@ -85,5 +86,6 @@ def read(id: str):
with open(f"{id}.pkl", "rb") as f:
wss = pickle.load(f)
print(wss)
f.close()
print(f"反序列化对象{wss}")
return wss