We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f767433 commit ac01ea3Copy full SHA for ac01ea3
diff.py
@@ -126,16 +126,16 @@ def display_diff(self):
126
global file1, diff
127
128
with open(file1, "r") as tmp_file1:
129
- o = tmp_file1.readlines()
130
- for x in range(len(o)):
131
- self.textEdit.append(o[x])
132
- self.textEdit_2.toHtml()
+ for line in tmp_file1:
+ line=line.strip()
+ self.textEdit.append(line)
+ self.textEdit.toHtml()
133
tmp_file1.close()
134
135
with open(diff, "r") as tmp_diff:
136
- d = tmp_diff.readlines()
137
- for x in range(len(d)):
138
- self.textEdit_2.append(d[x])
+ for line in tmp_diff:
+ self.textEdit_2.append(line)
139
self.textEdit_2.toHtml()
140
tmp_diff.close()
141
0 commit comments