Changeset 24200
- Timestamp:
- 10/03/19 09:33:24 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/scripts/BinRead.py
r21410 r24200 111 111 elif code == FormatToCode('MatArray'): 112 112 f.seek(reclen-4,1) 113 print "skipping %d bytes for code %d." % ( code, reclen-4)113 print "skipping %d bytes for code %d." % (reclen-4, code) 114 114 115 115 elif code == FormatToCode('StringArray'): 116 116 f.seek(reclen-4,1) 117 print "skipping %d bytes for code %d." % (code, reclen-4) 117 print "skipping %d bytes for code %d." % (reclen-4, code) 118 119 elif code == FormatToCode('CompressedMat'): 120 print "still need to implement reading for code %d." % code 118 121 119 122 else: 120 raise TypeError('BinRead error message: data type: %d not supported yet! (%s)' % (code, recordname))123 raise TypeError('BinRead error message: data type: %d not supported yet! (%s)' % (code, recordname)) 121 124 122 125 f.close() … … 128 131 sent. 129 132 """ 130 131 133 if format=='Boolean': 132 134 code=1 … … 147 149 elif format=='StringArray': 148 150 code=9 151 elif format=='CompressedMat': 152 code=10 149 153 else: 150 raise InputError('FormatToCode error message: data type not supported yet!')154 raise InputError('FormatToCode error message: data type %s not supported yet!' % format) 151 155 152 156 return code … … 158 162 sent. 159 163 """ 160 161 164 if code==1: 162 165 format='Boolean' … … 177 180 elif code==9: 178 181 format='StringArray' 182 elif code==10: 183 format='CompressedMat' 179 184 else: 180 raise TypeError(' FormatToCode error message: code %d not supported yet!' %code)185 raise TypeError('CodeToFormat error message: code %d not supported yet!' % code) 181 186 182 187 return format
Note:
See TracChangeset
for help on using the changeset viewer.