def load(filename):
"Load in an existing sequence from disk"
if filename.endswith('.gz'):
fp = gzip.GzipFile(filename, 'r')
elif filename.endswith('.bz2'):
fp = bz2.BZ2File(filename, 'r')
else:
fp = open(filename, 'rb')
u = Unpickler(fp)
return MonkeySequence(data=u.load())
评论列表
文章目录