spacepy.toolbox.savepickle¶
- spacepy.toolbox.savepickle(fln, dict, compress=None)[source]¶
save dictionary variable dict to a pickle with filename fln
- Parameters:
- flnstring
filename
- dictdict
container with stuff
- compressbool
- write as a gzip-compressed file
(.gz will be added to
fln
). If not specified, defaults to uncompressed, unless the compressed file exists and the uncompressed does not.
See also
Examples
>>> d = {'grade':[1,2,3], 'name':['Mary', 'John', 'Chris']} >>> savepickle('test.pbin', d)