Richard D. Moores wrote:
> f = open("factors.txt", 'rb')
> data = pickle.load(f)
> f.close
f.close looks up the close method but doesn't invoke it; you need f.close().
Alternatively use a with statement:
with open("factors.txt", "rb") as f:
data = pickle.load(f)
This will close the file even if an exception occurs when trying to unpickle
the data.
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor