Page 5 - BINARY FILE HANDLINNG
P. 5

Binary File Handling using pickle module:






           • When we write data structure like dictionary , tuple,


               array to a file ,we use module Pickle of python.



           • Picking refers to process of converting data


               structure into byte stream before writing to file.


           • We will use 2 methods of pickle module


           • dump(object,file object) is used  to convert object to


               byte stream and write into a file


           • object=load(file object)is used  to read from file to


               object



           • When we write object into a file we use dump() and

               when we read from file into an object we use load().
   1   2   3   4   5   6   7   8   9   10