RaphXVC
0
Q:

pickle load pickle file

pickle_in = open("dict.pickle","rb")
example_dict = pickle.load(pickle_in)
2
   1 # Load the dictionary back from the pickle file.
   2 import pickle
   3 
   4 favorite_color = pickle.load( open( "save.p", "rb" ) )
   5 # favorite_color is now { "lion": "yellow", "kitty": "red" }
0
objects = []
with (open("myfile", "rb")) as openfile:
    while True:
        try:
            objects.append(pickle.load(openfile))
        except EOFError:
            break
-1

New to Communities?

Join the community