Reputation: 51
I just new in python. How to save variable data to file like save command in MATLAB.
Thank you
Upvotes: 2
Views: 2000
Reputation: 51
Thx TheBlackCat
Example my code
try:
import cPickle as pickle # Improve speed
except ValueError:
import pickle
file_temp = open('temp', 'w')
pickle.dump(scenes, file_temp)
file_temp.close()
Upvotes: 1
Reputation: 10298
Use pickle.dump
in Python 3.x, or cPickle.dump
in Python 2.x.
Upvotes: 2