[Tutor] URGENT doubt!!!!

Hugo González Monteverde hugonz-lists at h-lab.net
Wed Mar 1 18:08:10 CET 2006


Ok, if it's so urgent.

import cPickle

mydict = {1:"one", 2:"two"}

#Saving
fileo = open("mysavedfile", "w")
cPickle.dump(mydict, fileo)
fileo.close()

fileo2 = open("mysavedfile", "r")
saved_dict = cPickle.load(fileo2)
print saved_dict

Hope this one is simple enough

Hugo


More information about the Tutor mailing list