textgames / read_pkl.py
fhudi's picture
Upload folder using huggingface_hub
7d76671 verified
raw
history blame
225 Bytes
import pickle
def read_pkl(fp):
with open(fp, "rb") as f:
data = []
try:
while True:
data.append(pickle.load(f))
except EOFError as e:
pass
return data