|
|
|
@ -71,12 +71,7 @@ def isWindows(): |
|
|
|
|
|
|
|
# compare two files (with filenames f1,f2) for equality |
|
|
|
def compareFiles(f1,f2): |
|
|
|
# We open the files in 'rU' mode (universal newline mode), |
|
|
|
# which automatically converts all the different newline |
|
|
|
# encodings to '\n'. |
|
|
|
# This allow the two files to differ in their |
|
|
|
# line ending encodings without affecting equality |
|
|
|
with open(f1, 'rU') as fp1, open(f2, 'rU') as fp2: |
|
|
|
with open(f1, 'r') as fp1, open(f2, 'r') as fp2: |
|
|
|
while True: |
|
|
|
s1 = fp1.readline() |
|
|
|
s2 = fp2.readline() |
|
|
|
|