generating/attaching/retrieving a non-OMERO related file
Posted: Fri Jan 21, 2011 6:42 pm
Hi All,
I'm trying to generate an output file from my Script in OMERO.Insight and attach it to a dataset.
Later from another Script, I also want to retrieve that output file, given the dataset ID.
Could anyone help me about this?
I'm trying to generate a pickle file that packs a complex data as the following python snippet
BK
I'm trying to generate an output file from my Script in OMERO.Insight and attach it to a dataset.
Later from another Script, I also want to retrieve that output file, given the dataset ID.
Could anyone help me about this?
I'm trying to generate a pickle file that packs a complex data as the following python snippet
- Code: Select all
# for generating a pickle file
import pickle
output = open('model.pkl','wb')
pickle.dump(final_model, output) # final_model: a complex data variable
output.close()
# for retrieving the pickle file
import pickle
pkl_file = open('model.pkl','rb')
final_model2 = pickle.load(pkl_file)
BK