Okay so when I open a file and I would like to pickle something to the file you are supposed to open the file in 'rb' (read binary) mode to load stuff from it. If you want to dump something the file is supposed to be in 'wb' (write binary) mode. What if I would like to change the file's privileges after i have already initialized the variable? For example:
file = open('textfile.txt', 'wb') pickle.dump(object, file) # do i need to change the file privileges here in order to load? # something like file.changePrivileges('rb') newThing = pickle.load(file)
sorry if this is a trivial question and I haven't scanned the documentation enough to find it yet but I figured it'd be faster to ask then continue reading the documentation. Thanks for help in advance!