Hi there,
why must file be opened in "r" -mode, before loading works
with Pickling? This forces me to close the file between pickle.dump
and pickle.load. :(
Example:
-----************------
a = {'pekka': 1, 'jussi': 2}
fh = open('c:\temp\log.log', "wb")
pickle.dump(a,fh)
fh.close()
**** now:
fh = open('c:\temp\log.log', "wb")
b = pickle.load(fh)
**** gives error:
IOError: (0, 'Error')
**** however:
fh = open('c:\temp\loglog', "rb")
b = pickle.load(fh)
**** works.
-pekka-