Changeset 1544
- Timestamp:
- Oct 26, 2014 3:36:02 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/imports/G2pwd_xye.py
r1476 r1544 88 88 # valid line to read 89 89 vals = S.split() 90 if len(vals) < 2: 91 print 'Line '+str(i+1)+' cannot be read:\n\t'+S 92 continue 90 93 try: 91 94 x.append(float(vals[0])) … … 101 104 w.append(1.0/float(vals[1])) 102 105 except ValueError: 106 msg = 'Error parsing number in line '+str(i+1) 107 print msg 108 print S 109 break 110 except: 103 111 msg = 'Error in line '+str(i+1) 104 112 print msg 113 print S 105 114 break 106 115 N = len(x)
Note: See TracChangeset
for help on using the changeset viewer.