[Tutor] [tutor] Reading/Writing Ascii text file

Eike Welk eike.welk at gmx.net
Tue Sep 18 16:12:04 CEST 2007


On Tuesday 18 September 2007 04:06, Varsha Purohit wrote:
>       I wanted a link or tutorial to help me understand how to read
> or write ascii text file in python. with and without using Numpy.

If you want to save a Numpy array as a text file, goto this web-page:
http://www.scipy.org/Numpy_Example_List_With_Doc

Look at:
savetxt(); tofile()
loadtxt(); fromfile()

If you also have Scipy and Matplotlib there are even more ways to save 
arrays as text files:
http://www.scipy.org/Cookbook/InputOutput

Regards,
Eike.


More information about the Tutor mailing list