printed too often what is read
This commit is contained in:
parent
c49a752ebd
commit
a6109c65b9
@ -8,13 +8,13 @@ class FileReader:
|
||||
def read_datafile( path ):
|
||||
# TODO analyze file (LF,MF, HF) and act accordingly
|
||||
print "Skipping first 4 lines!"
|
||||
data = np.loadtxt(path, skiprows=4)
|
||||
data = np.loadtxt(path, skiprows=4, comments="#")
|
||||
numpat = re.compile('\d+\.\d+')
|
||||
print "successfully read %s"%path
|
||||
try:
|
||||
Temp = None
|
||||
print "Searching for temperature in %s (any line with 'Fixed or 'Temp', with float, i.e. 273.15K or 273.15)" % path
|
||||
for i,line in enumerate(open(path).readlines()):
|
||||
print "Searching for temperature in %s (Line with 'Fixed or 'Temp', with float, i.e. 273.15K or 273.15)"%path
|
||||
if re.search("Fixed", line) or re.search("Temp", line):
|
||||
print "Found line containing 'Fixed' or 'Temp' (line %i):"%i
|
||||
print line
|
||||
|
Loading…
Reference in New Issue
Block a user