62 </table> |
62 </table> |
63 <h3>Methods</h3> |
63 <h3>Methods</h3> |
64 <table> |
64 <table> |
65 <tr> |
65 <tr> |
66 <td><a href="#CompareDialog.__init__">CompareDialog</a></td> |
66 <td><a href="#CompareDialog.__init__">CompareDialog</a></td> |
67 <td>Constructor</td> |
67 <td>Constructor</td> |
68 </tr><tr> |
68 </tr><tr> |
69 <td><a href="#CompareDialog.__appendText">__appendText</a></td> |
69 <td><a href="#CompareDialog.__appendText">__appendText</a></td> |
70 <td>Private method to append text to the end of the contents pane.</td> |
70 <td>Private method to append text to the end of the contents pane.</td> |
71 </tr><tr> |
71 </tr><tr> |
72 <td><a href="#CompareDialog.__fileChanged">__fileChanged</a></td> |
72 <td><a href="#CompareDialog.__fileChanged">__fileChanged</a></td> |
73 <td>Private slot to enable/disable the Compare button.</td> |
73 <td>Private slot to enable/disable the Compare button.</td> |
74 </tr><tr> |
74 </tr><tr> |
75 <td><a href="#CompareDialog.__moveTextToCurrentDiffPos">__moveTextToCurrentDiffPos</a></td> |
75 <td><a href="#CompareDialog.__moveTextToCurrentDiffPos">__moveTextToCurrentDiffPos</a></td> |
76 <td>Private slot to move the text display to the current diff position.</td> |
76 <td>Private slot to move the text display to the current diff position.</td> |
77 </tr><tr> |
77 </tr><tr> |
78 <td><a href="#CompareDialog.__scrollBarMoved">__scrollBarMoved</a></td> |
78 <td><a href="#CompareDialog.__scrollBarMoved">__scrollBarMoved</a></td> |
79 <td>Private slot to enable the buttons and set the current diff position depending on scrollbar position.</td> |
79 <td>Private slot to enable the buttons and set the current diff position depending on scrollbar position.</td> |
80 </tr><tr> |
80 </tr><tr> |
81 <td><a href="#CompareDialog.__selectFile">__selectFile</a></td> |
81 <td><a href="#CompareDialog.__selectFile">__selectFile</a></td> |
82 <td>Private slot to display a file selection dialog.</td> |
82 <td>Private slot to display a file selection dialog.</td> |
83 </tr><tr> |
83 </tr><tr> |
84 <td><a href="#CompareDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
84 <td><a href="#CompareDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
85 <td>Private slot called by a button of the button box clicked.</td> |
85 <td>Private slot called by a button of the button box clicked.</td> |
86 </tr><tr> |
86 </tr><tr> |
87 <td><a href="#CompareDialog.on_diffButton_clicked">on_diffButton_clicked</a></td> |
87 <td><a href="#CompareDialog.on_diffButton_clicked">on_diffButton_clicked</a></td> |
88 <td>Private slot to handle the Compare button press.</td> |
88 <td>Private slot to handle the Compare button press.</td> |
89 </tr><tr> |
89 </tr><tr> |
90 <td><a href="#CompareDialog.on_downButton_clicked">on_downButton_clicked</a></td> |
90 <td><a href="#CompareDialog.on_downButton_clicked">on_downButton_clicked</a></td> |
91 <td>Private slot to go to the next difference.</td> |
91 <td>Private slot to go to the next difference.</td> |
92 </tr><tr> |
92 </tr><tr> |
93 <td><a href="#CompareDialog.on_file1Button_clicked">on_file1Button_clicked</a></td> |
93 <td><a href="#CompareDialog.on_file1Button_clicked">on_file1Button_clicked</a></td> |
94 <td>Private slot to handle the file 1 file selection button press.</td> |
94 <td>Private slot to handle the file 1 file selection button press.</td> |
95 </tr><tr> |
95 </tr><tr> |
96 <td><a href="#CompareDialog.on_file2Button_clicked">on_file2Button_clicked</a></td> |
96 <td><a href="#CompareDialog.on_file2Button_clicked">on_file2Button_clicked</a></td> |
97 <td>Private slot to handle the file 2 file selection button press.</td> |
97 <td>Private slot to handle the file 2 file selection button press.</td> |
98 </tr><tr> |
98 </tr><tr> |
99 <td><a href="#CompareDialog.on_firstButton_clicked">on_firstButton_clicked</a></td> |
99 <td><a href="#CompareDialog.on_firstButton_clicked">on_firstButton_clicked</a></td> |
100 <td>Private slot to go to the first difference.</td> |
100 <td>Private slot to go to the first difference.</td> |
101 </tr><tr> |
101 </tr><tr> |
102 <td><a href="#CompareDialog.on_lastButton_clicked">on_lastButton_clicked</a></td> |
102 <td><a href="#CompareDialog.on_lastButton_clicked">on_lastButton_clicked</a></td> |
103 <td>Private slot to go to the last difference.</td> |
103 <td>Private slot to go to the last difference.</td> |
104 </tr><tr> |
104 </tr><tr> |
105 <td><a href="#CompareDialog.on_synchronizeCheckBox_toggled">on_synchronizeCheckBox_toggled</a></td> |
105 <td><a href="#CompareDialog.on_synchronizeCheckBox_toggled">on_synchronizeCheckBox_toggled</a></td> |
106 <td>Private slot to connect or disconnect the scrollbars of the displays.</td> |
106 <td>Private slot to connect or disconnect the scrollbars of the displays.</td> |
107 </tr><tr> |
107 </tr><tr> |
108 <td><a href="#CompareDialog.on_upButton_clicked">on_upButton_clicked</a></td> |
108 <td><a href="#CompareDialog.on_upButton_clicked">on_upButton_clicked</a></td> |
109 <td>Private slot to go to the previous difference.</td> |
109 <td>Private slot to go to the previous difference.</td> |
110 </tr><tr> |
110 </tr><tr> |
111 <td><a href="#CompareDialog.show">show</a></td> |
111 <td><a href="#CompareDialog.show">show</a></td> |
112 <td>Public slot to show the dialog.</td> |
112 <td>Public slot to show the dialog.</td> |
113 </tr> |
113 </tr> |
114 </table> |
114 </table> |
115 <a NAME="CompareDialog.__init__" ID="CompareDialog.__init__"></a> |
115 <a NAME="CompareDialog.__init__" ID="CompareDialog.__init__"></a> |
116 <h4>CompareDialog (Constructor)</h4> |
116 <h4>CompareDialog (Constructor)</h4> |
117 <b>CompareDialog</b>(<i>files = [], parent = None</i>) |
117 <b>CompareDialog</b>(<i>files = [], parent = None</i>) |
118 <p> |
118 <p> |
119 Constructor |
119 Constructor |
120 </p><dl> |
120 </p><dl> |
121 <dt><i>files</i></dt> |
121 <dt><i>files</i></dt> |
122 <dd> |
122 <dd> |
123 list of files to compare and their label |
123 list of files to compare and their label |
124 (list of two tuples of two strings) |
124 (list of two tuples of two strings) |
125 </dd><dt><i>parent</i></dt> |
125 </dd><dt><i>parent</i></dt> |
126 <dd> |
126 <dd> |
127 parent widget (QWidget) |
127 parent widget (QWidget) |
128 </dd> |
128 </dd> |
129 </dl><a NAME="CompareDialog.__appendText" ID="CompareDialog.__appendText"></a> |
129 </dl><a NAME="CompareDialog.__appendText" ID="CompareDialog.__appendText"></a> |
130 <h4>CompareDialog.__appendText</h4> |
130 <h4>CompareDialog.__appendText</h4> |
131 <b>__appendText</b>(<i>pane, linenumber, line, format, interLine = False</i>) |
131 <b>__appendText</b>(<i>pane, linenumber, line, format, interLine = False</i>) |
132 <p> |
132 <p> |
133 Private method to append text to the end of the contents pane. |
133 Private method to append text to the end of the contents pane. |
134 </p><dl> |
134 </p><dl> |
135 <dt><i>pane</i></dt> |
135 <dt><i>pane</i></dt> |
136 <dd> |
136 <dd> |
137 text edit widget to append text to (QTextedit) |
137 text edit widget to append text to (QTextedit) |
138 </dd><dt><i>linenumber</i></dt> |
138 </dd><dt><i>linenumber</i></dt> |
139 <dd> |
139 <dd> |
140 number of line to insert (string) |
140 number of line to insert (string) |
141 </dd><dt><i>line</i></dt> |
141 </dd><dt><i>line</i></dt> |
142 <dd> |
142 <dd> |
143 text to insert (string) |
143 text to insert (string) |
144 </dd><dt><i>format</i></dt> |
144 </dd><dt><i>format</i></dt> |
145 <dd> |
145 <dd> |
146 text format to be used (QTextCharFormat) |
146 text format to be used (QTextCharFormat) |
147 </dd><dt><i>interLine</i></dt> |
147 </dd><dt><i>interLine</i></dt> |
148 <dd> |
148 <dd> |
149 flag indicating interline changes (boolean) |
149 flag indicating interline changes (boolean) |
150 </dd> |
150 </dd> |
151 </dl><a NAME="CompareDialog.__fileChanged" ID="CompareDialog.__fileChanged"></a> |
151 </dl><a NAME="CompareDialog.__fileChanged" ID="CompareDialog.__fileChanged"></a> |
152 <h4>CompareDialog.__fileChanged</h4> |
152 <h4>CompareDialog.__fileChanged</h4> |
153 <b>__fileChanged</b>(<i></i>) |
153 <b>__fileChanged</b>(<i></i>) |
154 <p> |
154 <p> |
155 Private slot to enable/disable the Compare button. |
155 Private slot to enable/disable the Compare button. |
156 </p><a NAME="CompareDialog.__moveTextToCurrentDiffPos" ID="CompareDialog.__moveTextToCurrentDiffPos"></a> |
156 </p><a NAME="CompareDialog.__moveTextToCurrentDiffPos" ID="CompareDialog.__moveTextToCurrentDiffPos"></a> |
157 <h4>CompareDialog.__moveTextToCurrentDiffPos</h4> |
157 <h4>CompareDialog.__moveTextToCurrentDiffPos</h4> |
158 <b>__moveTextToCurrentDiffPos</b>(<i></i>) |
158 <b>__moveTextToCurrentDiffPos</b>(<i></i>) |
159 <p> |
159 <p> |
160 Private slot to move the text display to the current diff position. |
160 Private slot to move the text display to the current diff position. |
161 </p><a NAME="CompareDialog.__scrollBarMoved" ID="CompareDialog.__scrollBarMoved"></a> |
161 </p><a NAME="CompareDialog.__scrollBarMoved" ID="CompareDialog.__scrollBarMoved"></a> |
162 <h4>CompareDialog.__scrollBarMoved</h4> |
162 <h4>CompareDialog.__scrollBarMoved</h4> |
163 <b>__scrollBarMoved</b>(<i>value</i>) |
163 <b>__scrollBarMoved</b>(<i>value</i>) |
164 <p> |
164 <p> |
165 Private slot to enable the buttons and set the current diff position |
165 Private slot to enable the buttons and set the current diff position |
166 depending on scrollbar position. |
166 depending on scrollbar position. |
167 </p><dl> |
167 </p><dl> |
168 <dt><i>value</i></dt> |
168 <dt><i>value</i></dt> |
169 <dd> |
169 <dd> |
170 scrollbar position (integer) |
170 scrollbar position (integer) |
171 </dd> |
171 </dd> |
172 </dl><a NAME="CompareDialog.__selectFile" ID="CompareDialog.__selectFile"></a> |
172 </dl><a NAME="CompareDialog.__selectFile" ID="CompareDialog.__selectFile"></a> |
173 <h4>CompareDialog.__selectFile</h4> |
173 <h4>CompareDialog.__selectFile</h4> |
174 <b>__selectFile</b>(<i>lineEdit</i>) |
174 <b>__selectFile</b>(<i>lineEdit</i>) |
175 <p> |
175 <p> |
176 Private slot to display a file selection dialog. |
176 Private slot to display a file selection dialog. |
177 </p><dl> |
177 </p><dl> |
178 <dt><i>lineEdit</i></dt> |
178 <dt><i>lineEdit</i></dt> |
179 <dd> |
179 <dd> |
180 field for the display of the selected filename |
180 field for the display of the selected filename |
181 (QLineEdit) |
181 (QLineEdit) |
182 </dd> |
182 </dd> |
183 </dl><a NAME="CompareDialog.on_buttonBox_clicked" ID="CompareDialog.on_buttonBox_clicked"></a> |
183 </dl><a NAME="CompareDialog.on_buttonBox_clicked" ID="CompareDialog.on_buttonBox_clicked"></a> |
184 <h4>CompareDialog.on_buttonBox_clicked</h4> |
184 <h4>CompareDialog.on_buttonBox_clicked</h4> |
185 <b>on_buttonBox_clicked</b>(<i>button</i>) |
185 <b>on_buttonBox_clicked</b>(<i>button</i>) |
186 <p> |
186 <p> |
187 Private slot called by a button of the button box clicked. |
187 Private slot called by a button of the button box clicked. |
188 </p><dl> |
188 </p><dl> |
189 <dt><i>button</i></dt> |
189 <dt><i>button</i></dt> |
190 <dd> |
190 <dd> |
191 button that was clicked (QAbstractButton) |
191 button that was clicked (QAbstractButton) |
192 </dd> |
192 </dd> |
193 </dl><a NAME="CompareDialog.on_diffButton_clicked" ID="CompareDialog.on_diffButton_clicked"></a> |
193 </dl><a NAME="CompareDialog.on_diffButton_clicked" ID="CompareDialog.on_diffButton_clicked"></a> |
194 <h4>CompareDialog.on_diffButton_clicked</h4> |
194 <h4>CompareDialog.on_diffButton_clicked</h4> |
195 <b>on_diffButton_clicked</b>(<i></i>) |
195 <b>on_diffButton_clicked</b>(<i></i>) |
196 <p> |
196 <p> |
197 Private slot to handle the Compare button press. |
197 Private slot to handle the Compare button press. |
198 </p><a NAME="CompareDialog.on_downButton_clicked" ID="CompareDialog.on_downButton_clicked"></a> |
198 </p><a NAME="CompareDialog.on_downButton_clicked" ID="CompareDialog.on_downButton_clicked"></a> |
199 <h4>CompareDialog.on_downButton_clicked</h4> |
199 <h4>CompareDialog.on_downButton_clicked</h4> |
200 <b>on_downButton_clicked</b>(<i></i>) |
200 <b>on_downButton_clicked</b>(<i></i>) |
201 <p> |
201 <p> |
202 Private slot to go to the next difference. |
202 Private slot to go to the next difference. |
203 </p><a NAME="CompareDialog.on_file1Button_clicked" ID="CompareDialog.on_file1Button_clicked"></a> |
203 </p><a NAME="CompareDialog.on_file1Button_clicked" ID="CompareDialog.on_file1Button_clicked"></a> |
204 <h4>CompareDialog.on_file1Button_clicked</h4> |
204 <h4>CompareDialog.on_file1Button_clicked</h4> |
205 <b>on_file1Button_clicked</b>(<i></i>) |
205 <b>on_file1Button_clicked</b>(<i></i>) |
206 <p> |
206 <p> |
207 Private slot to handle the file 1 file selection button press. |
207 Private slot to handle the file 1 file selection button press. |
208 </p><a NAME="CompareDialog.on_file2Button_clicked" ID="CompareDialog.on_file2Button_clicked"></a> |
208 </p><a NAME="CompareDialog.on_file2Button_clicked" ID="CompareDialog.on_file2Button_clicked"></a> |
209 <h4>CompareDialog.on_file2Button_clicked</h4> |
209 <h4>CompareDialog.on_file2Button_clicked</h4> |
210 <b>on_file2Button_clicked</b>(<i></i>) |
210 <b>on_file2Button_clicked</b>(<i></i>) |
211 <p> |
211 <p> |
212 Private slot to handle the file 2 file selection button press. |
212 Private slot to handle the file 2 file selection button press. |
213 </p><a NAME="CompareDialog.on_firstButton_clicked" ID="CompareDialog.on_firstButton_clicked"></a> |
213 </p><a NAME="CompareDialog.on_firstButton_clicked" ID="CompareDialog.on_firstButton_clicked"></a> |
214 <h4>CompareDialog.on_firstButton_clicked</h4> |
214 <h4>CompareDialog.on_firstButton_clicked</h4> |
215 <b>on_firstButton_clicked</b>(<i></i>) |
215 <b>on_firstButton_clicked</b>(<i></i>) |
216 <p> |
216 <p> |
217 Private slot to go to the first difference. |
217 Private slot to go to the first difference. |
218 </p><a NAME="CompareDialog.on_lastButton_clicked" ID="CompareDialog.on_lastButton_clicked"></a> |
218 </p><a NAME="CompareDialog.on_lastButton_clicked" ID="CompareDialog.on_lastButton_clicked"></a> |
219 <h4>CompareDialog.on_lastButton_clicked</h4> |
219 <h4>CompareDialog.on_lastButton_clicked</h4> |
220 <b>on_lastButton_clicked</b>(<i></i>) |
220 <b>on_lastButton_clicked</b>(<i></i>) |
221 <p> |
221 <p> |
222 Private slot to go to the last difference. |
222 Private slot to go to the last difference. |
223 </p><a NAME="CompareDialog.on_synchronizeCheckBox_toggled" ID="CompareDialog.on_synchronizeCheckBox_toggled"></a> |
223 </p><a NAME="CompareDialog.on_synchronizeCheckBox_toggled" ID="CompareDialog.on_synchronizeCheckBox_toggled"></a> |
224 <h4>CompareDialog.on_synchronizeCheckBox_toggled</h4> |
224 <h4>CompareDialog.on_synchronizeCheckBox_toggled</h4> |
225 <b>on_synchronizeCheckBox_toggled</b>(<i>sync</i>) |
225 <b>on_synchronizeCheckBox_toggled</b>(<i>sync</i>) |
226 <p> |
226 <p> |
227 Private slot to connect or disconnect the scrollbars of the displays. |
227 Private slot to connect or disconnect the scrollbars of the displays. |
228 </p><dl> |
228 </p><dl> |
229 <dt><i>sync</i></dt> |
229 <dt><i>sync</i></dt> |
230 <dd> |
230 <dd> |
231 flag indicating synchronisation status (boolean) |
231 flag indicating synchronisation status (boolean) |
232 </dd> |
232 </dd> |
233 </dl><a NAME="CompareDialog.on_upButton_clicked" ID="CompareDialog.on_upButton_clicked"></a> |
233 </dl><a NAME="CompareDialog.on_upButton_clicked" ID="CompareDialog.on_upButton_clicked"></a> |
234 <h4>CompareDialog.on_upButton_clicked</h4> |
234 <h4>CompareDialog.on_upButton_clicked</h4> |
235 <b>on_upButton_clicked</b>(<i></i>) |
235 <b>on_upButton_clicked</b>(<i></i>) |
236 <p> |
236 <p> |
237 Private slot to go to the previous difference. |
237 Private slot to go to the previous difference. |
238 </p><a NAME="CompareDialog.show" ID="CompareDialog.show"></a> |
238 </p><a NAME="CompareDialog.show" ID="CompareDialog.show"></a> |
239 <h4>CompareDialog.show</h4> |
239 <h4>CompareDialog.show</h4> |
240 <b>show</b>(<i>filename = None</i>) |
240 <b>show</b>(<i>filename = None</i>) |
241 <p> |
241 <p> |
242 Public slot to show the dialog. |
242 Public slot to show the dialog. |
243 </p><dl> |
243 </p><dl> |
244 <dt><i>filename</i></dt> |
244 <dt><i>filename</i></dt> |
245 <dd> |
245 <dd> |
246 name of a file to use as the first file (string) |
246 name of a file to use as the first file (string) |
247 </dd> |
247 </dd> |
248 </dl> |
248 </dl> |
249 <div align="right"><a href="#top">Up</a></div> |
249 <div align="right"><a href="#top">Up</a></div> |
250 <hr /><hr /> |
250 <hr /><hr /> |
251 <a NAME="CompareWindow" ID="CompareWindow"></a> |
251 <a NAME="CompareWindow" ID="CompareWindow"></a> |
252 <h2>CompareWindow</h2> |
252 <h2>CompareWindow</h2> |
253 <p> |
253 <p> |
254 Main window class for the standalone dialog. |
254 Main window class for the standalone dialog. |
255 </p> |
255 </p> |
256 <h3>Derived from</h3> |
256 <h3>Derived from</h3> |
257 QMainWindow |
257 QMainWindow |
258 <h3>Class Attributes</h3> |
258 <h3>Class Attributes</h3> |
259 <table> |
259 <table> |
261 </table> |
261 </table> |
262 <h3>Methods</h3> |
262 <h3>Methods</h3> |
263 <table> |
263 <table> |
264 <tr> |
264 <tr> |
265 <td><a href="#CompareWindow.__init__">CompareWindow</a></td> |
265 <td><a href="#CompareWindow.__init__">CompareWindow</a></td> |
266 <td>Constructor</td> |
266 <td>Constructor</td> |
267 </tr><tr> |
267 </tr><tr> |
268 <td><a href="#CompareWindow.eventFilter">eventFilter</a></td> |
268 <td><a href="#CompareWindow.eventFilter">eventFilter</a></td> |
269 <td>Public method to filter events.</td> |
269 <td>Public method to filter events.</td> |
270 </tr> |
270 </tr> |
271 </table> |
271 </table> |
272 <a NAME="CompareWindow.__init__" ID="CompareWindow.__init__"></a> |
272 <a NAME="CompareWindow.__init__" ID="CompareWindow.__init__"></a> |
273 <h4>CompareWindow (Constructor)</h4> |
273 <h4>CompareWindow (Constructor)</h4> |
274 <b>CompareWindow</b>(<i>files = [], parent = None</i>) |
274 <b>CompareWindow</b>(<i>files = [], parent = None</i>) |
275 <p> |
275 <p> |
276 Constructor |
276 Constructor |
277 </p><dl> |
277 </p><dl> |
278 <dt><i>files</i></dt> |
278 <dt><i>files</i></dt> |
279 <dd> |
279 <dd> |
280 list of files to compare and their label |
280 list of files to compare and their label |
281 (list of two tuples of two strings) |
281 (list of two tuples of two strings) |
282 </dd><dt><i>parent</i></dt> |
282 </dd><dt><i>parent</i></dt> |
283 <dd> |
283 <dd> |
284 reference to the parent widget (QWidget) |
284 reference to the parent widget (QWidget) |
285 </dd> |
285 </dd> |
286 </dl><a NAME="CompareWindow.eventFilter" ID="CompareWindow.eventFilter"></a> |
286 </dl><a NAME="CompareWindow.eventFilter" ID="CompareWindow.eventFilter"></a> |
287 <h4>CompareWindow.eventFilter</h4> |
287 <h4>CompareWindow.eventFilter</h4> |
288 <b>eventFilter</b>(<i>obj, event</i>) |
288 <b>eventFilter</b>(<i>obj, event</i>) |
289 <p> |
289 <p> |
290 Public method to filter events. |
290 Public method to filter events. |
291 </p><dl> |
291 </p><dl> |
292 <dt><i>obj</i></dt> |
292 <dt><i>obj</i></dt> |
293 <dd> |
293 <dd> |
294 reference to the object the event is meant for (QObject) |
294 reference to the object the event is meant for (QObject) |
295 </dd><dt><i>event</i></dt> |
295 </dd><dt><i>event</i></dt> |
296 <dd> |
296 <dd> |
297 reference to the event object (QEvent) |
297 reference to the event object (QEvent) |
298 </dd> |
298 </dd> |
299 </dl><dl> |
299 </dl><dl> |
300 <dt>Returns:</dt> |
300 <dt>Returns:</dt> |
301 <dd> |
301 <dd> |
302 flag indicating, whether the event was handled (boolean) |
302 flag indicating, whether the event was handled (boolean) |
303 </dd> |
303 </dd> |
304 </dl> |
304 </dl> |
305 <div align="right"><a href="#top">Up</a></div> |
305 <div align="right"><a href="#top">Up</a></div> |
306 <hr /><hr /> |
306 <hr /><hr /> |
307 <a NAME="removeMarkers" ID="removeMarkers"></a> |
307 <a NAME="removeMarkers" ID="removeMarkers"></a> |
308 <h2>removeMarkers</h2> |
308 <h2>removeMarkers</h2> |
309 <b>removeMarkers</b>(<i>line</i>) |
309 <b>removeMarkers</b>(<i>line</i>) |
310 <p> |
310 <p> |
311 Internal function to remove all diff markers. |
311 Internal function to remove all diff markers. |
312 </p><dl> |
312 </p><dl> |
313 <dt><i>line</i></dt> |
313 <dt><i>line</i></dt> |
314 <dd> |
314 <dd> |
315 line to work on (string) |
315 line to work on (string) |
316 </dd> |
316 </dd> |
317 </dl><dl> |
317 </dl><dl> |
318 <dt>Returns:</dt> |
318 <dt>Returns:</dt> |
319 <dd> |
319 <dd> |
320 line without diff markers (string) |
320 line without diff markers (string) |
321 </dd> |
321 </dd> |
322 </dl> |
322 </dl> |
323 <div align="right"><a href="#top">Up</a></div> |
323 <div align="right"><a href="#top">Up</a></div> |
324 <hr /><hr /> |
324 <hr /><hr /> |
325 <a NAME="sbsdiff" ID="sbsdiff"></a> |
325 <a NAME="sbsdiff" ID="sbsdiff"></a> |
326 <h2>sbsdiff</h2> |
326 <h2>sbsdiff</h2> |
327 <b>sbsdiff</b>(<i>a, b, linenumberwidth = 4</i>) |
327 <b>sbsdiff</b>(<i>a, b, linenumberwidth = 4</i>) |
328 <p> |
328 <p> |
329 Compare two sequences of lines; generate the delta for display side by side. |
329 Compare two sequences of lines; generate the delta for display side by side. |
330 </p><dl> |
330 </p><dl> |
331 <dt><i>a</i></dt> |
331 <dt><i>a</i></dt> |
332 <dd> |
332 <dd> |
333 first sequence of lines (list of strings) |
333 first sequence of lines (list of strings) |
334 </dd><dt><i>b</i></dt> |
334 </dd><dt><i>b</i></dt> |
335 <dd> |
335 <dd> |
336 second sequence of lines (list of strings) |
336 second sequence of lines (list of strings) |
337 </dd><dt><i>linenumberwidth</i></dt> |
337 </dd><dt><i>linenumberwidth</i></dt> |
338 <dd> |
338 <dd> |
339 width (in characters) of the linenumbers (integer) |
339 width (in characters) of the linenumbers (integer) |
340 </dd> |
340 </dd> |
341 </dl><dl> |
341 </dl><dl> |
342 <dt>Returns:</dt> |
342 <dt>Returns:</dt> |
343 <dd> |
343 <dd> |
344 a generator yielding tuples of differences. The tuple is composed |
344 a generator yielding tuples of differences. The tuple is composed |
345 of strings as follows. |
345 of strings as follows. |
346 <ul> |
346 <ul> |
347 <li>opcode -- one of e, d, i, r for equal, delete, insert, replace</li> |
347 <li>opcode -- one of e, d, i, r for equal, delete, insert, replace</li> |
348 <li>lineno a -- linenumber of sequence a</li> |
348 <li>lineno a -- linenumber of sequence a</li> |
349 <li>line a -- line of sequence a</li> |
349 <li>line a -- line of sequence a</li> |
350 <li>lineno b -- linenumber of sequence b</li> |
350 <li>lineno b -- linenumber of sequence b</li> |
351 <li>line b -- line of sequence b</li> |
351 <li>line b -- line of sequence b</li> |
352 </ul> |
352 </ul> |
353 </dd> |
353 </dd> |
354 </dl> |
354 </dl> |
355 <div align="right"><a href="#top">Up</a></div> |
355 <div align="right"><a href="#top">Up</a></div> |
356 <hr /> |
356 <hr /> |
357 </body></html> |
357 </body></html> |