Changeset 4635
- Timestamp:
- Jul 24, 2007, 10:42:54 AM (17 years ago)
- Location:
- anuga_core/source/anuga/abstract_2d_finite_volumes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/test_util.py
r4634 r4635 1388 1388 #------------------------------------------------------------- 1389 1389 if __name__ == "__main__": 1390 #suite = unittest.makeSuite(Test_Util,'test')1391 suite = unittest.makeSuite(Test_Util,'test_get_min_max_values')1390 suite = unittest.makeSuite(Test_Util,'test') 1391 # suite = unittest.makeSuite(Test_Util,'test_get_min_max_values') 1392 1392 runner = unittest.TextTestRunner(verbosity=0) 1393 1393 runner.run(suite) -
anuga_core/source/anuga/abstract_2d_finite_volumes/util.py
r4634 r4635 970 970 line11 = line1.split(',') 971 971 972 try: 973 float(line11[0]) 974 except: 972 if isinstance(line11[0],str) is True: 975 973 # We have found text in the first line 976 974 east_index = None … … 999 997 lines = lines[1:] # Remove header from data 1000 998 else: 1001 # First field in first line contains a number, so there is no header. Assume that this is a simple easting, northing file999 # No header, assume that this is a simple easting, northing file 1002 1000 1003 1001 msg = 'There was no header in file %s and the number of columns is %d' %(filename, len(line11)) … … 1902 1900 return min1, max1 1903 1901 1904 def sortedDictValues(adict): 1905 """Sorts a dictionary by the Keys 1906 This code was authored by Alex Martelli (8/4/2001) and 1907 sourced from ASPN 1908 """ 1909 1910 items = adict.items() 1911 items.sort() 1912 print 'items',items 1913 return [value for key, value in items] 1914 1915 1916 1917 1918 1919 1902 1903 1904 1905 1906 1907
Note: See TracChangeset
for help on using the changeset viewer.