This commit is contained in:
JIAKUNHAO 2022-11-24 17:12:46 +08:00
parent 7061757f27
commit f68f33cd34

View File

@ -75,12 +75,15 @@ manager = WebsocketUtil()
def write(id: str, ws: List):
print(f"序列化对象{ws}")
with open(f"{id}.pkl", "wb") as f:
wsdump = pickle.dump(ws, f)
def read(id: str):
with open(f"{id}.pkl", "rb") as f:
wss = pickle.load(f)
print(wss)
print(f"反序列化对象{wss}")
return wss