Off topic:how to convert a pkl file into txt file using cPickle in python
0
0
Entering edit mode
9.8 years ago

Hi!

I am trying to convert a .pkl file into text file using cPickle module in python. Using the code

>>> import cPickle
>>> data=cPickle.load(open("input.pkl","rb"))
>>> output=open("write.txt","w")
>>> output.write(str(data))
>>> output.flush()
>>> output.close()

But it is getting converted partially (only few lines of pkl file are getting converted into text format).

is there any way? please suggest.

file conversion • 34k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2817 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6