On Fri, Mar 18, 2011 at 5:21 PM, Jon Herman <jfc.her...@gmail.com> wrote:
> Folks, > > thanks for the many responses! Specifying the full file name (and not using > parentheses when inappropriate, thanks Jack :)) I am now happily > reading/writing files. > > My next question: what is the best way for me to write an array I generated > to a file? > And what is the best way for me to load that array again, the next time I > start up my computer? > > Basically I am doing very large computations and want to store the results. > > Thanks a lot guys! > > Jon > > To save a data structure like an array (called a list in Python), you can use the pickle module. Here's the documentation on pickle. http://docs.python.org/library/pickle.html http://www.developertutorials.com/tutorials/python/python-persistence-management-050405-1306/ -- Jack Trades Pointless Programming Blog <http://pointlessprogramming.wordpress.com>
-- http://mail.python.org/mailman/listinfo/python-list