I want to be able to retrieve the location of the script that created a certain pickle
file. This happens especially if I work on a project, then stop, and after some time I need to come back.
In these cases, wouldn't it be easier if we could retrieve the script path by simply right-clicking on the pickle
file we are working with, and read the path from the Properties->Details tab of the file?
If you create the following
numpy
array, which is meant to represent any object, and save it as apickle
, is there a way to add to the file details the path of the generating script?#Generating script: C:\Users\MyName\Desktop\hopethisworks.py import numpy import pickle a=numpy.array([1,2,3,4,5,6]) with open('myarray.pickle', 'wb') as handle: pickle.dump(a, handle, protocol=pickle.HIGHEST_PROTOCOL)