Browse files

strip CR chars from source TRD on read

  • Loading branch information...
1 parent cf88c3a commit 5e5d4d4bb732a2109fd06449b088ce145326e50f @bergey committed Feb 6, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 TRN_Resdh4.py
View
3 TRN_Resdh4.py
@@ -165,6 +165,7 @@ def MakeCaseFile(Run, TRDFile, DestFolder, DestTRD):
#print("Run is in column %s" % RunColumn)
for line in CaseLines:
if line == '\n':
+ print("dropped blank line")
continue # native windows takes \r as newline
# reads \n as a second, blank line
line = line.replace('\r', '').replace('\n','').split(',')
@@ -185,7 +186,7 @@ def MakeCaseFile(Run, TRDFile, DestFolder, DestTRD):
#fcurrCase.close()
#print("closed casefile")
f1 = open(TRDFile, 'r')
- TRDLines = f1.readlines()
+ TRDLines = [line.replace('\r', '') for line in f1.readlines()]
f1.close()
#print("read %s" % TRDFile;)
#print(CaseTags)

0 comments on commit 5e5d4d4

Please sign in to comment.