timholy/HDF5.jl — pull request #101 by mbauman (2014-06-17 19:20:07+00:00)
Title: WIP: Add save and load functions that operate on dictionaries

These functions are similar to their macro counterparts, except that they operate on and return dictionaries instead of variables directly in the global namespace.

`save` takes a filename and a dictionary with bytestring keys. The dictionary key-value pairs are saved in the file, with the keys as the variable names and the values as their contents.

`load` takes a filename and (optionally) a list of variable names to read. If no variable names are given, all names in the file are read. It reads the variables into a dictionary that is returned.

Furthermore, the `@load` macro now returns a list of variables that it loaded.

Would fix #98. Still needs tests and documentation. And perhaps a bike-shed: Should `save` and `load` be exported?

I needed this for myself; may as well push it upstream, too.