Changeset 4178 for anuga_core/source/anuga
- Timestamp:
- Jan 15, 2007, 3:15:05 PM (18 years ago)
- Location:
- anuga_core/source/anuga/geospatial_data
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/geospatial_data/geospatial_data.py
r4175 r4178 3 3 4 4 """ 5 5 from sys import maxint 6 6 from os import access, F_OK, R_OK 7 7 from types import DictType … … 592 592 msg = '.xya format is deprecated. Please use .txt.' 593 593 warn(msg, DeprecationWarning) 594 #import sys; sys.exit()595 594 if absolute is True: 596 595 _write_xya_file(file_name, … … 843 842 file_pointer = open(file_name) 844 843 header, file_pointer = _read_csv_file_header(file_pointer) 845 846 while True: 847 try: 848 pointlist, att_dict,file_pointer = _read_csv_file_blocking( \ 844 pointlist, att_dict,file_pointer = _read_csv_file_blocking( \ 849 845 file_pointer, 850 846 header, 851 max_read_lines=MAX_READ_LINES) #FIXME: must be highest int 852 except StopIteration: 853 break 847 max_read_lines=1e30) #If the file is bigger that this, block.. 854 848 855 849 file_pointer.close() … … 1293 1287 1294 1288 if __name__ == "__main__": 1295 g = Geospatial_data("t.txt") 1296 print "g.get_data_points()", g.get_data_points() 1297 for i,a in enumerate(g): 1298 if i >3: break 1299 print a 1300 1289 pass 1290 -
anuga_core/source/anuga/geospatial_data/test_geospatial_data.py
r4175 r4178 651 651 652 652 def test_load_csv(self): 653 # To test the mesh side of loading xya files.654 # Not the loading of xya files655 653 656 654 import os
Note: See TracChangeset
for help on using the changeset viewer.