如何解开泡菜扩展名文件 [英] How to unpickle pickle extension file
问题描述
我已经下载了一个泡菜文件:
I have downloaded a pickle file:
foo.pickle.gz.pickle
从我下载此文件的页面描述了将其解压缩为 .pickle
.我搜索了有关python pickle的信息,其中有很多页面描述了如何在python中使用,但没有系统范围的描述.如何解压缩或解压缩?我正在使用Ubuntu 16.04
预先感谢!
The page from where I downloaded this file describes decompressing it to .pickle
. I searched about python pickle, there are many pages that describe how to use in python, but not system wide. How can I decompress or unzip it? I am using ubuntu 16.04
Thanks in advance!
推荐答案
Pickle
是Python对象序列化模块的名称.因此,您必须使用python脚本释放"它.基本的合奏是:
Pickle
is the name of Python object serialisation module. So, you have to 'unpickle' it with a python script. Basic synthax is:
import pickle
with open('filename', 'rb') as pickled_one:
data = pickle.load(pickled_one)
有关更多详细信息,请参见此处,有关官方Python文档.
More details are available here, on official Python documentation.
我必须在同一页面上对此警告您:
I do have to warn you about this, from that same page:
泡菜模块无法防止错误或恶意构造的数据.永远不要破坏从不受信任或信任的人那里收到的数据未经身份验证的来源.
这篇关于如何解开泡菜扩展名文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!