writing arrays to binary file

2006-01-25 Thread Sheldon
Hi everyone, I have a short program the writes the output data to an acsii file: import sys import os import string import gisdata from Numeric import * def latlon(area_id, i, j): lon_file = lon_%s.dat % area_id flon= open(lon_file, 'wa') lat_file = lat_%s.dat % area_id

Re: writing arrays to binary file

2006-01-25 Thread Fredrik Lundh
Sheldon wrote: I have a short program the writes the output data to an acsii file: import sys import os import string import gisdata from Numeric import * def latlon(area_id, i, j): lon_file = lon_%s.dat % area_id flon= open(lon_file, 'wa') lat_file = lat_%s.dat

Re: writing arrays to binary file

2006-01-25 Thread Travis E. Oliphant
Sheldon wrote: Hi everyone, I have a short program the writes the output data to an acsii file: import sys import os import string import gisdata from Numeric import * def latlon(area_id, i, j): lon_file = lon_%s.dat % area_id flon= open(lon_file, 'wa')

Re: writing arrays to binary file

2006-01-25 Thread Sheldon
Thanks Travis, I don't have the new NumPy yet but this tofile() method should work fine. /Sheldon -- http://mail.python.org/mailman/listinfo/python-list