Popular recipes by Karthikesh Raju http://code.activestate.com/recipes/users/561376/2004-07-22T18:07:39-07:00ActiveState Code RecipesDumping and loading variables in ascii format (Python)
2004-07-22T18:07:39-07:00Karthikesh Rajuhttp://code.activestate.com/recipes/users/561376/http://code.activestate.com/recipes/286171-dumping-and-loading-variables-in-ascii-format/
<p style="color: grey">
Python
recipe 286171
by <a href="/recipes/users/561376/">Karthikesh Raju</a>
.
Revision 6.
</p>
<p>Dump and load variables for exchanging data between matlab and numarray.
The variables are in a dictionary, and each key in the variable gets
dumped into a file named after the variable. If the variable is complex,
the real and imag parts are dumped into separate files.</p>
<p>Loading of files, created by matlab is also possible. In this case, the returned dictionary has the keys derived from the file names and values from the files.</p>