pickling to an output file.
ssmile03 at gmail.com
Tue Feb 28 07:23:36 EST 2012
I have created a bytestream (readfile.pkl) from pickle.dump() already in
different folder (say /tmp) succesfully. Now I wish to open the file, read
it and finally write the output to a file to "output.txt".
To read the file bytestream file (readfile.pkl) I did perform as --
with open('/tmp/readfile.pkl', 'rb') as f:
my_shared = pickle.load(f)
My above code should perform all 3 of below -
(a) Open the pickle file as above
(b) read the pickled object
(c) write the output to a file say "output.txt"
Can I have know if my above code is reading properly and how to write to an
output file 'output.txt'
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list