<br><div class="gmail_quote">On Fri, Mar 18, 2011 at 5:21 PM, Jon Herman <span dir="ltr"><<a href="mailto:jfc.herman@gmail.com">jfc.herman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Folks,<br><br>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.<br><br>My next question: what is the best way for me to write an array I generated to a file?<br>

And what is the best way for me to load that array again, the next time I start up my computer?<br><br>Basically I am doing very large computations and want to store the results.<br><br>Thanks a lot guys!<br><font color="#888888"><br>
Jon</font><div><div></div><br clear="all"></div></blockquote></div><br>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.<br><br><a href="http://docs.python.org/library/pickle.html">http://docs.python.org/library/pickle.html</a><br>
<a href="http://www.developertutorials.com/tutorials/python/python-persistence-management-050405-1306/">http://www.developertutorials.com/tutorials/python/python-persistence-management-050405-1306/</a><br><br><br>-- <br>Jack Trades<br>
<a href="http://pointlessprogramming.wordpress.com" target="_blank">Pointless Programming Blog</a><br><br>