. for my own notes and in case someone else comes across this issue - here was my solution :
Code: Select all
myUserDefs = []
for x in range(len(myAction)) :
myUserDefs.append(myAction[x].__dict__)
f = open("/Users/anomad/perfTest15.dat",'wb')
cPickle.dump(myUserDefs, f)
f.close()
. notes :
. myAction is a list of custom 'Action' objects that contained several fields and a few methods
. myUserDefs is list that will be filled with a dictionary containing name:value pairs from the 'Action' object
. cPickle is used to basically write the list of name:value pairs to a file in my home directory
. then, for the load, i pull the information back in and recreate the list of 'Action' objects in to 'myAction'
. i went about this method because i'm storing an effect definition dictionary in the object and this was the cleanest way i found to save the multiple data types the 'Action' object was using.
. my module may publicly see the light of day once again!
-james
(a nomad. )