Wow, Jack, that is one awesome and simple module...thank you so much! I am happily storing and accessing all the arrays I could ever want :)<br><br>Thanks to all for the quick assistance!<br><br><br><br><br><div class="gmail_quote">
On Fri, Mar 18, 2011 at 4:24 PM, Jack Trades <span dir="ltr"><<a href="mailto:jacktradespublic@gmail.com">jacktradespublic@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;">
<div class="im"><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" target="_blank">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></div>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" target="_blank">http://docs.python.org/library/pickle.html</a><br>
<a href="http://www.developertutorials.com/tutorials/python/python-persistence-management-050405-1306/" target="_blank">http://www.developertutorials.com/tutorials/python/python-persistence-management-050405-1306/</a><div>
<div></div><div class="h5"><br><br><br>-- <br>Jack Trades<br>
<a href="http://pointlessprogramming.wordpress.com" target="_blank">Pointless Programming Blog</a><br><br>
</div></div></blockquote></div><br>