Documentation/Source/eric5.UI.DiffDialog.html

changeset 58
37f0444c3479
parent 21
b88a0e6268bd
child 409
0ea528e80202
diff -r 81326a94fdca -r 37f0444c3479 Documentation/Source/eric5.UI.DiffDialog.html
--- a/Documentation/Source/eric5.UI.DiffDialog.html	Thu Jan 14 17:27:31 2010 +0000
+++ b/Documentation/Source/eric5.UI.DiffDialog.html	Thu Jan 14 18:35:52 2010 +0000
@@ -22,7 +22,7 @@
 <body><a NAME="top" ID="top"></a>
 <h1>eric5.UI.DiffDialog</h1>
 <p>
-&#77;&#111;&#100;&#117;&#108;&#101; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#97; &#100;&#105;&#97;&#108;&#111;&#103; &#116;&#111; &#99;&#111;&#109;&#112;&#97;&#114;&#101; &#116;w&#111; &#102;&#105;&#108;&#101;&#115;.
+Module implementing a dialog to compare two files.
 </p>
 <h3>Global Attributes</h3>
 <table>
@@ -32,27 +32,27 @@
 <table>
 <tr>
 <td><a href="#DiffDialog">DiffDialog</a></td>
-<td>&#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#97; &#100;&#105;&#97;&#108;&#111;&#103; &#116;&#111; &#99;&#111;&#109;&#112;&#97;&#114;&#101; &#116;w&#111; &#102;&#105;&#108;&#101;&#115;.</td>
+<td>Class implementing a dialog to compare two files.</td>
 </tr><tr>
 <td><a href="#DiffWindow">DiffWindow</a></td>
-<td>&#77;&#97;&#105;&#110; w&#105;&#110;&#100;&#111;w &#99;&#108;&#97;&#115;&#115; &#102;&#111;&#114; &#116;&#104;&#101; &#115;&#116;&#97;&#110;&#100;&#97;&#108;&#111;&#110;&#101; &#100;&#105;&#97;&#108;&#111;&#103;.</td>
+<td>Main window class for the standalone dialog.</td>
 </tr>
 </table>
 <h3>Functions</h3>
 <table>
 <tr>
 <td><a href="#context_diff">context_diff</a></td>
-<td>&#67;&#111;&#109;&#112;&#97;&#114;&#101; &#116;w&#111; &#115;&#101;&#113;&#117;&#101;&#110;&#99;&#101;&#115; &#111;&#102; &#108;&#105;&#110;&#101;&#115;&#59; &#103;&#101;&#110;&#101;&#114;&#97;&#116;&#101; &#116;&#104;&#101; &#100;&#101;&#108;&#116;&#97; &#97;&#115; &#97; &#99;&#111;&#110;&#116;&#101;x&#116; &#100;&#105;&#102;&#102;.</td>
+<td>Compare two sequences of lines; generate the delta as a context diff.</td>
 </tr><tr>
 <td><a href="#unified_diff">unified_diff</a></td>
-<td>&#67;&#111;&#109;&#112;&#97;&#114;&#101; &#116;w&#111; &#115;&#101;&#113;&#117;&#101;&#110;&#99;&#101;&#115; &#111;&#102; &#108;&#105;&#110;&#101;&#115;&#59; &#103;&#101;&#110;&#101;&#114;&#97;&#116;&#101; &#116;&#104;&#101; &#100;&#101;&#108;&#116;&#97; &#97;&#115; &#97; &#117;&#110;&#105;&#102;&#105;&#101;&#100; &#100;&#105;&#102;&#102;.</td>
+<td>Compare two sequences of lines; generate the delta as a unified diff.</td>
 </tr>
 </table>
 <hr /><hr />
 <a NAME="DiffDialog" ID="DiffDialog"></a>
 <h2>DiffDialog</h2>
 <p>
-    &#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#97; &#100;&#105;&#97;&#108;&#111;&#103; &#116;&#111; &#99;&#111;&#109;&#112;&#97;&#114;&#101; &#116;w&#111; &#102;&#105;&#108;&#101;&#115;.
+    Class implementing a dialog to compare two files.
 </p>
 <h3>Derived from</h3>
 QWidget, Ui_DiffDialog
@@ -64,168 +64,168 @@
 <table>
 <tr>
 <td><a href="#DiffDialog.__init__">DiffDialog</a></td>
-<td>&#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;</td>
+<td>Constructor</td>
 </tr><tr>
 <td><a href="#DiffDialog.__appendText">__appendText</a></td>
-<td>&#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#97;&#112;&#112;&#101;&#110;&#100; &#116;&#101;x&#116; &#116;&#111; &#116;&#104;&#101; &#101;&#110;&#100; &#111;&#102; &#116;&#104;&#101; &#99;&#111;&#110;&#116;&#101;&#110;&#116;&#115; &#112;&#97;&#110;&#101;.</td>
+<td>Private method to append text to the end of the contents pane.</td>
 </tr><tr>
 <td><a href="#DiffDialog.__fileChanged">__fileChanged</a></td>
-<td>&#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#101;&#110;&#97;&#98;&#108;&#101;/&#100;&#105;&#115;&#97;&#98;&#108;&#101; &#116;&#104;&#101; &#67;&#111;&#109;&#112;&#97;&#114;&#101; &#98;&#117;&#116;&#116;&#111;&#110;.</td>
+<td>Private slot to enable/disable the Compare button.</td>
 </tr><tr>
 <td><a href="#DiffDialog.__generateContextDiff">__generateContextDiff</a></td>
-<td>&#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#103;&#101;&#110;&#101;&#114;&#97;&#116;&#101; &#97; &#99;&#111;&#110;&#116;&#101;x&#116; &#100;&#105;&#102;&#102; &#111;&#117;&#116;&#112;&#117;&#116;.</td>
+<td>Private slot to generate a context diff output.</td>
 </tr><tr>
 <td><a href="#DiffDialog.__generateUnifiedDiff">__generateUnifiedDiff</a></td>
-<td>&#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#103;&#101;&#110;&#101;&#114;&#97;&#116;&#101; &#97; &#117;&#110;&#105;&#102;&#105;&#101;&#100; &#100;&#105;&#102;&#102; &#111;&#117;&#116;&#112;&#117;&#116;.</td>
+<td>Private slot to generate a unified diff output.</td>
 </tr><tr>
 <td><a href="#DiffDialog.__selectFile">__selectFile</a></td>
-<td>&#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#100;&#105;&#115;&#112;&#108;&#97;y &#97; &#102;&#105;&#108;&#101; &#115;&#101;&#108;&#101;&#99;&#116;&#105;&#111;&#110; &#100;&#105;&#97;&#108;&#111;&#103;.</td>
+<td>Private slot to display a file selection dialog.</td>
 </tr><tr>
 <td><a href="#DiffDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
-<td>&#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#99;&#97;&#108;&#108;&#101;&#100; &#98;y &#97; &#98;&#117;&#116;&#116;&#111;&#110; &#111;&#102; &#116;&#104;&#101; &#98;&#117;&#116;&#116;&#111;&#110; &#98;&#111;x &#99;&#108;&#105;&#99;&#107;&#101;&#100;.</td>
+<td>Private slot called by a button of the button box clicked.</td>
 </tr><tr>
 <td><a href="#DiffDialog.on_diffButton_clicked">on_diffButton_clicked</a></td>
-<td>&#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#67;&#111;&#109;&#112;&#97;&#114;&#101; &#98;&#117;&#116;&#116;&#111;&#110; &#112;&#114;&#101;&#115;&#115;.</td>
+<td>Private slot to handle the Compare button press.</td>
 </tr><tr>
 <td><a href="#DiffDialog.on_file1Button_clicked">on_file1Button_clicked</a></td>
-<td>&#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#102;&#105;&#108;&#101; &#49; &#102;&#105;&#108;&#101; &#115;&#101;&#108;&#101;&#99;&#116;&#105;&#111;&#110; &#98;&#117;&#116;&#116;&#111;&#110; &#112;&#114;&#101;&#115;&#115;.</td>
+<td>Private slot to handle the file 1 file selection button press.</td>
 </tr><tr>
 <td><a href="#DiffDialog.on_file2Button_clicked">on_file2Button_clicked</a></td>
-<td>&#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#102;&#105;&#108;&#101; &#50; &#102;&#105;&#108;&#101; &#115;&#101;&#108;&#101;&#99;&#116;&#105;&#111;&#110; &#98;&#117;&#116;&#116;&#111;&#110; &#112;&#114;&#101;&#115;&#115;.</td>
+<td>Private slot to handle the file 2 file selection button press.</td>
 </tr><tr>
 <td><a href="#DiffDialog.on_saveButton_clicked">on_saveButton_clicked</a></td>
-<td>&#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#83;&#97;v&#101; &#98;&#117;&#116;&#116;&#111;&#110; &#112;&#114;&#101;&#115;&#115;.</td>
+<td>Private slot to handle the Save button press.</td>
 </tr><tr>
 <td><a href="#DiffDialog.show">show</a></td>
-<td>&#80;&#117;&#98;&#108;&#105;&#99; &#115;&#108;&#111;&#116; &#116;&#111; &#115;&#104;&#111;w &#116;&#104;&#101; &#100;&#105;&#97;&#108;&#111;&#103;.</td>
+<td>Public slot to show the dialog.</td>
 </tr>
 </table>
 <a NAME="DiffDialog.__init__" ID="DiffDialog.__init__"></a>
 <h4>DiffDialog (Constructor)</h4>
 <b>DiffDialog</b>(<i>parent = None</i>)
 <p>
-        &#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;
+        Constructor
 </p><a NAME="DiffDialog.__appendText" ID="DiffDialog.__appendText"></a>
 <h4>DiffDialog.__appendText</h4>
 <b>__appendText</b>(<i>txt, format</i>)
 <p>
-        &#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#97;&#112;&#112;&#101;&#110;&#100; &#116;&#101;x&#116; &#116;&#111; &#116;&#104;&#101; &#101;&#110;&#100; &#111;&#102; &#116;&#104;&#101; &#99;&#111;&#110;&#116;&#101;&#110;&#116;&#115; &#112;&#97;&#110;&#101;.
+        Private method to append text to the end of the contents pane.
 </p><dl>
 <dt><i>txt</i></dt>
 <dd>
-&#116;&#101;x&#116; &#116;&#111; &#105;&#110;&#115;&#101;&#114;&#116; (&#115;&#116;&#114;&#105;&#110;&#103;)
+text to insert (string)
 </dd><dt><i>format</i></dt>
 <dd>
-&#116;&#101;x&#116; &#102;&#111;&#114;&#109;&#97;&#116; &#116;&#111; &#98;&#101; &#117;&#115;&#101;&#100; (&#81;&#84;&#101;x&#116;&#67;&#104;&#97;&#114;&#70;&#111;&#114;&#109;&#97;&#116;)
+text format to be used (QTextCharFormat)
 </dd>
 </dl><a NAME="DiffDialog.__fileChanged" ID="DiffDialog.__fileChanged"></a>
 <h4>DiffDialog.__fileChanged</h4>
 <b>__fileChanged</b>(<i></i>)
 <p>
-        &#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#101;&#110;&#97;&#98;&#108;&#101;/&#100;&#105;&#115;&#97;&#98;&#108;&#101; &#116;&#104;&#101; &#67;&#111;&#109;&#112;&#97;&#114;&#101; &#98;&#117;&#116;&#116;&#111;&#110;.
+        Private slot to enable/disable the Compare button.
 </p><a NAME="DiffDialog.__generateContextDiff" ID="DiffDialog.__generateContextDiff"></a>
 <h4>DiffDialog.__generateContextDiff</h4>
 <b>__generateContextDiff</b>(<i>a, b, fromfile, tofile, fromfiledate, tofiledate</i>)
 <p>
-        &#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#103;&#101;&#110;&#101;&#114;&#97;&#116;&#101; &#97; &#99;&#111;&#110;&#116;&#101;x&#116; &#100;&#105;&#102;&#102; &#111;&#117;&#116;&#112;&#117;&#116;.
+        Private slot to generate a context diff output.
 </p><dl>
 <dt><i>a</i></dt>
 <dd>
-&#102;&#105;&#114;&#115;&#116; &#115;&#101;&#113;&#117;&#101;&#110;&#99;&#101; &#111;&#102; &#108;&#105;&#110;&#101;&#115; (&#108;&#105;&#115;&#116; &#111;&#102; &#115;&#116;&#114;&#105;&#110;&#103;&#115;)
+first sequence of lines (list of strings)
 </dd><dt><i>b</i></dt>
 <dd>
-&#115;&#101;&#99;&#111;&#110;&#100; &#115;&#101;&#113;&#117;&#101;&#110;&#99;&#101; &#111;&#102; &#108;&#105;&#110;&#101;&#115; (&#108;&#105;&#115;&#116; &#111;&#102; &#115;&#116;&#114;&#105;&#110;&#103;&#115;)
+second sequence of lines (list of strings)
 </dd><dt><i>fromfile</i></dt>
 <dd>
-&#102;&#105;&#108;&#101;&#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#102;&#105;&#114;&#115;&#116; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+filename of the first file (string)
 </dd><dt><i>tofile</i></dt>
 <dd>
-&#102;&#105;&#108;&#101;&#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#115;&#101;&#99;&#111;&#110;&#100; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+filename of the second file (string)
 </dd><dt><i>fromfiledate</i></dt>
 <dd>
-&#109;&#111;&#100;&#105;&#102;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#116;&#105;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#102;&#105;&#114;&#115;&#116; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+modification time of the first file (string)
 </dd><dt><i>tofiledate</i></dt>
 <dd>
-&#109;&#111;&#100;&#105;&#102;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#116;&#105;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#115;&#101;&#99;&#111;&#110;&#100; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+modification time of the second file (string)
 </dd>
 </dl><a NAME="DiffDialog.__generateUnifiedDiff" ID="DiffDialog.__generateUnifiedDiff"></a>
 <h4>DiffDialog.__generateUnifiedDiff</h4>
 <b>__generateUnifiedDiff</b>(<i>a, b, fromfile, tofile, fromfiledate, tofiledate</i>)
 <p>
-        &#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#103;&#101;&#110;&#101;&#114;&#97;&#116;&#101; &#97; &#117;&#110;&#105;&#102;&#105;&#101;&#100; &#100;&#105;&#102;&#102; &#111;&#117;&#116;&#112;&#117;&#116;.
+        Private slot to generate a unified diff output.
 </p><dl>
 <dt><i>a</i></dt>
 <dd>
-&#102;&#105;&#114;&#115;&#116; &#115;&#101;&#113;&#117;&#101;&#110;&#99;&#101; &#111;&#102; &#108;&#105;&#110;&#101;&#115; (&#108;&#105;&#115;&#116; &#111;&#102; &#115;&#116;&#114;&#105;&#110;&#103;&#115;)
+first sequence of lines (list of strings)
 </dd><dt><i>b</i></dt>
 <dd>
-&#115;&#101;&#99;&#111;&#110;&#100; &#115;&#101;&#113;&#117;&#101;&#110;&#99;&#101; &#111;&#102; &#108;&#105;&#110;&#101;&#115; (&#108;&#105;&#115;&#116; &#111;&#102; &#115;&#116;&#114;&#105;&#110;&#103;&#115;)
+second sequence of lines (list of strings)
 </dd><dt><i>fromfile</i></dt>
 <dd>
-&#102;&#105;&#108;&#101;&#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#102;&#105;&#114;&#115;&#116; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+filename of the first file (string)
 </dd><dt><i>tofile</i></dt>
 <dd>
-&#102;&#105;&#108;&#101;&#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#115;&#101;&#99;&#111;&#110;&#100; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+filename of the second file (string)
 </dd><dt><i>fromfiledate</i></dt>
 <dd>
-&#109;&#111;&#100;&#105;&#102;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#116;&#105;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#102;&#105;&#114;&#115;&#116; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+modification time of the first file (string)
 </dd><dt><i>tofiledate</i></dt>
 <dd>
-&#109;&#111;&#100;&#105;&#102;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#116;&#105;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#115;&#101;&#99;&#111;&#110;&#100; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+modification time of the second file (string)
 </dd>
 </dl><a NAME="DiffDialog.__selectFile" ID="DiffDialog.__selectFile"></a>
 <h4>DiffDialog.__selectFile</h4>
 <b>__selectFile</b>(<i>lineEdit</i>)
 <p>
-        &#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#100;&#105;&#115;&#112;&#108;&#97;y &#97; &#102;&#105;&#108;&#101; &#115;&#101;&#108;&#101;&#99;&#116;&#105;&#111;&#110; &#100;&#105;&#97;&#108;&#111;&#103;.
+        Private slot to display a file selection dialog.
 </p><dl>
 <dt><i>lineEdit</i></dt>
 <dd>
-&#102;&#105;&#101;&#108;&#100; &#102;&#111;&#114; &#116;&#104;&#101; &#100;&#105;&#115;&#112;&#108;&#97;y &#111;&#102; &#116;&#104;&#101; &#115;&#101;&#108;&#101;&#99;&#116;&#101;&#100; &#102;&#105;&#108;&#101;&#110;&#97;&#109;&#101;
-                (&#81;&#76;&#105;&#110;&#101;&#69;&#100;&#105;&#116;)
+field for the display of the selected filename
+                (QLineEdit)
 </dd>
 </dl><a NAME="DiffDialog.on_buttonBox_clicked" ID="DiffDialog.on_buttonBox_clicked"></a>
 <h4>DiffDialog.on_buttonBox_clicked</h4>
 <b>on_buttonBox_clicked</b>(<i>button</i>)
 <p>
-        &#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#99;&#97;&#108;&#108;&#101;&#100; &#98;y &#97; &#98;&#117;&#116;&#116;&#111;&#110; &#111;&#102; &#116;&#104;&#101; &#98;&#117;&#116;&#116;&#111;&#110; &#98;&#111;x &#99;&#108;&#105;&#99;&#107;&#101;&#100;.
+        Private slot called by a button of the button box clicked.
 </p><dl>
 <dt><i>button</i></dt>
 <dd>
-&#98;&#117;&#116;&#116;&#111;&#110; &#116;&#104;&#97;&#116; w&#97;&#115; &#99;&#108;&#105;&#99;&#107;&#101;&#100; (&#81;&#65;&#98;&#115;&#116;&#114;&#97;&#99;&#116;&#66;&#117;&#116;&#116;&#111;&#110;)
+button that was clicked (QAbstractButton)
 </dd>
 </dl><a NAME="DiffDialog.on_diffButton_clicked" ID="DiffDialog.on_diffButton_clicked"></a>
 <h4>DiffDialog.on_diffButton_clicked</h4>
 <b>on_diffButton_clicked</b>(<i></i>)
 <p>
-        &#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#67;&#111;&#109;&#112;&#97;&#114;&#101; &#98;&#117;&#116;&#116;&#111;&#110; &#112;&#114;&#101;&#115;&#115;.
+        Private slot to handle the Compare button press.
 </p><a NAME="DiffDialog.on_file1Button_clicked" ID="DiffDialog.on_file1Button_clicked"></a>
 <h4>DiffDialog.on_file1Button_clicked</h4>
 <b>on_file1Button_clicked</b>(<i></i>)
 <p>
-        &#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#102;&#105;&#108;&#101; &#49; &#102;&#105;&#108;&#101; &#115;&#101;&#108;&#101;&#99;&#116;&#105;&#111;&#110; &#98;&#117;&#116;&#116;&#111;&#110; &#112;&#114;&#101;&#115;&#115;.
+        Private slot to handle the file 1 file selection button press.
 </p><a NAME="DiffDialog.on_file2Button_clicked" ID="DiffDialog.on_file2Button_clicked"></a>
 <h4>DiffDialog.on_file2Button_clicked</h4>
 <b>on_file2Button_clicked</b>(<i></i>)
 <p>
-        &#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#102;&#105;&#108;&#101; &#50; &#102;&#105;&#108;&#101; &#115;&#101;&#108;&#101;&#99;&#116;&#105;&#111;&#110; &#98;&#117;&#116;&#116;&#111;&#110; &#112;&#114;&#101;&#115;&#115;.
+        Private slot to handle the file 2 file selection button press.
 </p><a NAME="DiffDialog.on_saveButton_clicked" ID="DiffDialog.on_saveButton_clicked"></a>
 <h4>DiffDialog.on_saveButton_clicked</h4>
 <b>on_saveButton_clicked</b>(<i></i>)
 <p>
-        &#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#83;&#97;v&#101; &#98;&#117;&#116;&#116;&#111;&#110; &#112;&#114;&#101;&#115;&#115;.
+        Private slot to handle the Save button press.
 </p><p>
-        &#73;&#116; &#115;&#97;v&#101;&#115; &#116;&#104;&#101; &#100;&#105;&#102;&#102; &#115;&#104;&#111;w&#110; &#105;&#110; &#116;&#104;&#101; &#100;&#105;&#97;&#108;&#111;&#103; &#116;&#111; &#97; &#102;&#105;&#108;&#101; &#105;&#110; &#116;&#104;&#101; &#108;&#111;&#99;&#97;&#108;
-        &#102;&#105;&#108;&#101;&#115;y&#115;&#116;&#101;&#109;.
+        It saves the diff shown in the dialog to a file in the local
+        filesystem.
 </p><a NAME="DiffDialog.show" ID="DiffDialog.show"></a>
 <h4>DiffDialog.show</h4>
 <b>show</b>(<i>filename = None</i>)
 <p>
-        &#80;&#117;&#98;&#108;&#105;&#99; &#115;&#108;&#111;&#116; &#116;&#111; &#115;&#104;&#111;w &#116;&#104;&#101; &#100;&#105;&#97;&#108;&#111;&#103;.
+        Public slot to show the dialog.
 </p><dl>
 <dt><i>filename</i></dt>
 <dd>
-&#110;&#97;&#109;&#101; &#111;&#102; &#97; &#102;&#105;&#108;&#101; &#116;&#111; &#117;&#115;&#101; &#97;&#115; &#116;&#104;&#101; &#102;&#105;&#114;&#115;&#116; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+name of a file to use as the first file (string)
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
@@ -233,7 +233,7 @@
 <a NAME="DiffWindow" ID="DiffWindow"></a>
 <h2>DiffWindow</h2>
 <p>
-    &#77;&#97;&#105;&#110; w&#105;&#110;&#100;&#111;w &#99;&#108;&#97;&#115;&#115; &#102;&#111;&#114; &#116;&#104;&#101; &#115;&#116;&#97;&#110;&#100;&#97;&#108;&#111;&#110;&#101; &#100;&#105;&#97;&#108;&#111;&#103;.
+    Main window class for the standalone dialog.
 </p>
 <h3>Derived from</h3>
 QMainWindow
@@ -245,39 +245,39 @@
 <table>
 <tr>
 <td><a href="#DiffWindow.__init__">DiffWindow</a></td>
-<td>&#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;</td>
+<td>Constructor</td>
 </tr><tr>
 <td><a href="#DiffWindow.eventFilter">eventFilter</a></td>
-<td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#102;&#105;&#108;&#116;&#101;&#114; &#101;v&#101;&#110;&#116;&#115;.</td>
+<td>Public method to filter events.</td>
 </tr>
 </table>
 <a NAME="DiffWindow.__init__" ID="DiffWindow.__init__"></a>
 <h4>DiffWindow (Constructor)</h4>
 <b>DiffWindow</b>(<i>parent = None</i>)
 <p>
-        &#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;
+        Constructor
 </p><dl>
 <dt><i>parent</i></dt>
 <dd>
-&#114;&#101;&#102;&#101;&#114;&#101;&#110;&#99;&#101; &#116;&#111; &#116;&#104;&#101; &#112;&#97;&#114;&#101;&#110;&#116; w&#105;&#100;&#103;&#101;&#116; (&#81;&#87;&#105;&#100;&#103;&#101;&#116;)
+reference to the parent widget (QWidget)
 </dd>
 </dl><a NAME="DiffWindow.eventFilter" ID="DiffWindow.eventFilter"></a>
 <h4>DiffWindow.eventFilter</h4>
 <b>eventFilter</b>(<i>obj, event</i>)
 <p>
-        &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#102;&#105;&#108;&#116;&#101;&#114; &#101;v&#101;&#110;&#116;&#115;.
+        Public method to filter events.
 </p><dl>
 <dt><i>obj</i></dt>
 <dd>
-&#114;&#101;&#102;&#101;&#114;&#101;&#110;&#99;&#101; &#116;&#111; &#116;&#104;&#101; &#111;&#98;&#106;&#101;&#99;&#116; &#116;&#104;&#101; &#101;v&#101;&#110;&#116; &#105;&#115; &#109;&#101;&#97;&#110;&#116; &#102;&#111;&#114; (&#81;&#79;&#98;&#106;&#101;&#99;&#116;)
+reference to the object the event is meant for (QObject)
 </dd><dt><i>event</i></dt>
 <dd>
-&#114;&#101;&#102;&#101;&#114;&#101;&#110;&#99;&#101; &#116;&#111; &#116;&#104;&#101; &#101;v&#101;&#110;&#116; &#111;&#98;&#106;&#101;&#99;&#116; (&#81;&#69;v&#101;&#110;&#116;)
+reference to the event object (QEvent)
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-&#102;&#108;&#97;&#103; &#105;&#110;&#100;&#105;&#99;&#97;&#116;&#105;&#110;&#103;, w&#104;&#101;&#116;&#104;&#101;&#114; &#116;&#104;&#101; &#101;v&#101;&#110;&#116; w&#97;&#115; &#104;&#97;&#110;&#100;&#108;&#101;&#100; (&#98;&#111;&#111;&#108;&#101;&#97;&#110;)
+flag indicating, whether the event was handled (boolean)
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
@@ -286,77 +286,77 @@
 <h2>context_diff</h2>
 <b>context_diff</b>(<i>a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n'</i>)
 <p>
-    &#67;&#111;&#109;&#112;&#97;&#114;&#101; &#116;w&#111; &#115;&#101;&#113;&#117;&#101;&#110;&#99;&#101;&#115; &#111;&#102; &#108;&#105;&#110;&#101;&#115;&#59; &#103;&#101;&#110;&#101;&#114;&#97;&#116;&#101; &#116;&#104;&#101; &#100;&#101;&#108;&#116;&#97; &#97;&#115; &#97; &#99;&#111;&#110;&#116;&#101;x&#116; &#100;&#105;&#102;&#102;.
+    Compare two sequences of lines; generate the delta as a context diff.
 </p><p>
-    &#67;&#111;&#110;&#116;&#101;x&#116; &#100;&#105;&#102;&#102;&#115; &#97;&#114;&#101; &#97; &#99;&#111;&#109;&#112;&#97;&#99;&#116; w&#97;y &#111;&#102; &#115;&#104;&#111;w&#105;&#110;&#103; &#108;&#105;&#110;&#101; &#99;&#104;&#97;&#110;&#103;&#101;&#115; &#97;&#110;&#100; &#97; &#102;&#101;w
-    &#108;&#105;&#110;&#101;&#115; &#111;&#102; &#99;&#111;&#110;&#116;&#101;x&#116;.  &#84;&#104;&#101; &#110;&#117;&#109;&#98;&#101;&#114; &#111;&#102; &#99;&#111;&#110;&#116;&#101;x&#116; &#108;&#105;&#110;&#101;&#115; &#105;&#115; &#115;&#101;&#116; &#98;y '&#110;' w&#104;&#105;&#99;&#104;
-    &#100;&#101;&#102;&#97;&#117;&#108;&#116;&#115; &#116;&#111; &#116;&#104;&#114;&#101;&#101;.
+    Context diffs are a compact way of showing line changes and a few
+    lines of context.  The number of context lines is set by 'n' which
+    defaults to three.
 </p><p>
-    &#66;y &#100;&#101;&#102;&#97;&#117;&#108;&#116;, &#116;&#104;&#101; &#100;&#105;&#102;&#102; &#99;&#111;&#110;&#116;&#114;&#111;&#108; &#108;&#105;&#110;&#101;&#115; (&#116;&#104;&#111;&#115;&#101; w&#105;&#116;&#104; *** &#111;&#114; ---) &#97;&#114;&#101;
-    &#99;&#114;&#101;&#97;&#116;&#101;&#100; w&#105;&#116;&#104; &#97; &#116;&#114;&#97;&#105;&#108;&#105;&#110;&#103; &#110;&#101;w&#108;&#105;&#110;&#101;.  &#84;&#104;&#105;&#115; &#105;&#115; &#104;&#101;&#108;&#112;&#102;&#117;&#108; &#115;&#111; &#116;&#104;&#97;&#116; &#105;&#110;&#112;&#117;&#116;&#115;
-    &#99;&#114;&#101;&#97;&#116;&#101;&#100; &#102;&#114;&#111;&#109; &#102;&#105;&#108;&#101;.&#114;&#101;&#97;&#100;&#108;&#105;&#110;&#101;&#115;() &#114;&#101;&#115;&#117;&#108;&#116; &#105;&#110; &#100;&#105;&#102;&#102;&#115; &#116;&#104;&#97;&#116; &#97;&#114;&#101; &#115;&#117;&#105;&#116;&#97;&#98;&#108;&#101; &#102;&#111;&#114;
-    &#102;&#105;&#108;&#101;.w&#114;&#105;&#116;&#101;&#108;&#105;&#110;&#101;&#115;() &#115;&#105;&#110;&#99;&#101; &#98;&#111;&#116;&#104; &#116;&#104;&#101; &#105;&#110;&#112;&#117;&#116;&#115; &#97;&#110;&#100; &#111;&#117;&#116;&#112;&#117;&#116;&#115; &#104;&#97;v&#101; &#116;&#114;&#97;&#105;&#108;&#105;&#110;&#103;
-    &#110;&#101;w&#108;&#105;&#110;&#101;&#115;.
+    By default, the diff control lines (those with *** or ---) are
+    created with a trailing newline.  This is helpful so that inputs
+    created from file.readlines() result in diffs that are suitable for
+    file.writelines() since both the inputs and outputs have trailing
+    newlines.
 </p><p>
-    &#70;&#111;&#114; &#105;&#110;&#112;&#117;&#116;&#115; &#116;&#104;&#97;&#116; &#100;&#111; &#110;&#111;&#116; &#104;&#97;v&#101; &#116;&#114;&#97;&#105;&#108;&#105;&#110;&#103; &#110;&#101;w&#108;&#105;&#110;&#101;&#115;, &#115;&#101;&#116; &#116;&#104;&#101; &#108;&#105;&#110;&#101;&#116;&#101;&#114;&#109;
-    &#97;&#114;&#103;&#117;&#109;&#101;&#110;&#116; &#116;&#111; "" &#115;&#111; &#116;&#104;&#97;&#116; &#116;&#104;&#101; &#111;&#117;&#116;&#112;&#117;&#116; w&#105;&#108;&#108; &#98;&#101; &#117;&#110;&#105;&#102;&#111;&#114;&#109;&#108;y &#110;&#101;w&#108;&#105;&#110;&#101; &#102;&#114;&#101;&#101;.
+    For inputs that do not have trailing newlines, set the lineterm
+    argument to "" so that the output will be uniformly newline free.
 </p><p>
-    &#84;&#104;&#101; &#99;&#111;&#110;&#116;&#101;x&#116; &#100;&#105;&#102;&#102; &#102;&#111;&#114;&#109;&#97;&#116; &#110;&#111;&#114;&#109;&#97;&#108;&#108;y &#104;&#97;&#115; &#97; &#104;&#101;&#97;&#100;&#101;&#114; &#102;&#111;&#114; &#102;&#105;&#108;&#101;&#110;&#97;&#109;&#101;&#115; &#97;&#110;&#100;
-    &#109;&#111;&#100;&#105;&#102;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#116;&#105;&#109;&#101;&#115;.  &#65;&#110;y &#111;&#114; &#97;&#108;&#108; &#111;&#102; &#116;&#104;&#101;&#115;&#101; &#109;&#97;y &#98;&#101; &#115;&#112;&#101;&#99;&#105;&#102;&#105;&#101;&#100; &#117;&#115;&#105;&#110;&#103;
-    &#115;&#116;&#114;&#105;&#110;&#103;&#115; &#102;&#111;&#114; '&#102;&#114;&#111;&#109;&#102;&#105;&#108;&#101;', '&#116;&#111;&#102;&#105;&#108;&#101;', '&#102;&#114;&#111;&#109;&#102;&#105;&#108;&#101;&#100;&#97;&#116;&#101;', &#97;&#110;&#100; '&#116;&#111;&#102;&#105;&#108;&#101;&#100;&#97;&#116;&#101;'.
-    &#84;&#104;&#101; &#109;&#111;&#100;&#105;&#102;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#116;&#105;&#109;&#101;&#115; &#97;&#114;&#101; &#110;&#111;&#114;&#109;&#97;&#108;&#108;y &#101;x&#112;&#114;&#101;&#115;&#115;&#101;&#100; &#105;&#110; &#116;&#104;&#101; &#102;&#111;&#114;&#109;&#97;&#116; &#114;&#101;&#116;&#117;&#114;&#110;&#101;&#100;
-    &#98;y &#116;&#105;&#109;&#101;.&#99;&#116;&#105;&#109;&#101;().  &#73;&#102; &#110;&#111;&#116; &#115;&#112;&#101;&#99;&#105;&#102;&#105;&#101;&#100;, &#116;&#104;&#101; &#115;&#116;&#114;&#105;&#110;&#103;&#115; &#100;&#101;&#102;&#97;&#117;&#108;&#116; &#116;&#111; &#98;&#108;&#97;&#110;&#107;&#115;.
+    The context diff format normally has a header for filenames and
+    modification times.  Any or all of these may be specified using
+    strings for 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'.
+    The modification times are normally expressed in the format returned
+    by time.ctime().  If not specified, the strings default to blanks.
 </p><p>
-    &#69;x&#97;&#109;&#112;&#108;&#101;&#58;
+    Example:
 </p><p>
-    &#60;&#112;&#114;&#101;&#62;
-    &&#103;&#116;&#59;&&#103;&#116;&#59;&&#103;&#116;&#59; &#112;&#114;&#105;&#110;&#116; ''.&#106;&#111;&#105;&#110;(&#99;&#111;&#110;&#116;&#101;x&#116;&#95;&#100;&#105;&#102;&#102;('&#111;&#110;&#101;&#92;&#110;&#116;w&#111;&#92;&#110;&#116;&#104;&#114;&#101;&#101;&#92;&#110;&#102;&#111;&#117;&#114;&#92;&#110;'.&#115;&#112;&#108;&#105;&#116;&#108;&#105;&#110;&#101;&#115;(&#49;),
-    ...       'z&#101;&#114;&#111;&#92;&#110;&#111;&#110;&#101;&#92;&#110;&#116;&#114;&#101;&#101;&#92;&#110;&#102;&#111;&#117;&#114;&#92;&#110;'.&#115;&#112;&#108;&#105;&#116;&#108;&#105;&#110;&#101;&#115;(&#49;), '&#79;&#114;&#105;&#103;&#105;&#110;&#97;&#108;', '&#67;&#117;&#114;&#114;&#101;&#110;&#116;',
-    ...       '&#83;&#97;&#116; &#74;&#97;&#110; &#50;&#54; &#50;&#51;&#58;&#51;&#48;&#58;&#53;&#48; &#49;&#57;&#57;&#49;', '&#70;&#114;&#105; &#74;&#117;&#110; &#48;&#54; &#49;&#48;&#58;&#50;&#50;&#58;&#52;&#54; &#50;&#48;&#48;&#51;')),
-    *** &#79;&#114;&#105;&#103;&#105;&#110;&#97;&#108; &#83;&#97;&#116; &#74;&#97;&#110; &#50;&#54; &#50;&#51;&#58;&#51;&#48;&#58;&#53;&#48; &#49;&#57;&#57;&#49;
-    --- &#67;&#117;&#114;&#114;&#101;&#110;&#116; &#70;&#114;&#105; &#74;&#117;&#110; &#48;&#54; &#49;&#48;&#58;&#50;&#50;&#58;&#52;&#54; &#50;&#48;&#48;&#51;
+    <pre>
+    &gt;&gt;&gt; print ''.join(context_diff('one\ntwo\nthree\nfour\n'.splitlines(1),
+    ...       'zero\none\ntree\nfour\n'.splitlines(1), 'Original', 'Current',
+    ...       'Sat Jan 26 23:30:50 1991', 'Fri Jun 06 10:22:46 2003')),
+    *** Original Sat Jan 26 23:30:50 1991
+    --- Current Fri Jun 06 10:22:46 2003
     ***************
-    *** &#49;,&#52; ****
-      &#111;&#110;&#101;
-    ! &#116;w&#111;
-    ! &#116;&#104;&#114;&#101;&#101;
-      &#102;&#111;&#117;&#114;
-    --- &#49;,&#52; ----
-    + z&#101;&#114;&#111;
-      &#111;&#110;&#101;
-    ! &#116;&#114;&#101;&#101;
-      &#102;&#111;&#117;&#114;
-    &#60;/&#112;&#114;&#101;&#62;
+    *** 1,4 ****
+      one
+    ! two
+    ! three
+      four
+    --- 1,4 ----
+    + zero
+      one
+    ! tree
+      four
+    </pre>
 </p><dl>
 <dt><i>a</i></dt>
 <dd>
-&#102;&#105;&#114;&#115;&#116; &#115;&#101;&#113;&#117;&#101;&#110;&#99;&#101; &#111;&#102; &#108;&#105;&#110;&#101;&#115; (&#108;&#105;&#115;&#116; &#111;&#102; &#115;&#116;&#114;&#105;&#110;&#103;&#115;)
+first sequence of lines (list of strings)
 </dd><dt><i>b</i></dt>
 <dd>
-&#115;&#101;&#99;&#111;&#110;&#100; &#115;&#101;&#113;&#117;&#101;&#110;&#99;&#101; &#111;&#102; &#108;&#105;&#110;&#101;&#115; (&#108;&#105;&#115;&#116; &#111;&#102; &#115;&#116;&#114;&#105;&#110;&#103;&#115;)
+second sequence of lines (list of strings)
 </dd><dt><i>fromfile</i></dt>
 <dd>
-&#102;&#105;&#108;&#101;&#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#102;&#105;&#114;&#115;&#116; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+filename of the first file (string)
 </dd><dt><i>tofile</i></dt>
 <dd>
-&#102;&#105;&#108;&#101;&#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#115;&#101;&#99;&#111;&#110;&#100; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+filename of the second file (string)
 </dd><dt><i>fromfiledate</i></dt>
 <dd>
-&#109;&#111;&#100;&#105;&#102;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#116;&#105;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#102;&#105;&#114;&#115;&#116; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+modification time of the first file (string)
 </dd><dt><i>tofiledate</i></dt>
 <dd>
-&#109;&#111;&#100;&#105;&#102;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#116;&#105;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#115;&#101;&#99;&#111;&#110;&#100; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+modification time of the second file (string)
 </dd><dt><i>n</i></dt>
 <dd>
-&#110;&#117;&#109;&#98;&#101;&#114; &#111;&#102; &#108;&#105;&#110;&#101;&#115; &#111;&#102; &#99;&#111;&#110;&#116;&#101;x&#116; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;)
+number of lines of context (integer)
 </dd><dt><i>lineterm</i></dt>
 <dd>
-&#108;&#105;&#110;&#101; &#116;&#101;&#114;&#109;&#105;&#110;&#97;&#116;&#105;&#111;&#110; &#115;&#116;&#114;&#105;&#110;&#103; (&#115;&#116;&#114;&#105;&#110;&#103;)
+line termination string (string)
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-&#97; &#103;&#101;&#110;&#101;&#114;&#97;&#116;&#111;&#114; y&#105;&#101;&#108;&#100;&#105;&#110;&#103; &#108;&#105;&#110;&#101;&#115; &#111;&#102; &#100;&#105;&#102;&#102;&#101;&#114;&#101;&#110;&#99;&#101;&#115;
+a generator yielding lines of differences
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
@@ -365,74 +365,74 @@
 <h2>unified_diff</h2>
 <b>unified_diff</b>(<i>a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n'</i>)
 <p>
-    &#67;&#111;&#109;&#112;&#97;&#114;&#101; &#116;w&#111; &#115;&#101;&#113;&#117;&#101;&#110;&#99;&#101;&#115; &#111;&#102; &#108;&#105;&#110;&#101;&#115;&#59; &#103;&#101;&#110;&#101;&#114;&#97;&#116;&#101; &#116;&#104;&#101; &#100;&#101;&#108;&#116;&#97; &#97;&#115; &#97; &#117;&#110;&#105;&#102;&#105;&#101;&#100; &#100;&#105;&#102;&#102;.
+    Compare two sequences of lines; generate the delta as a unified diff.
 </p><p>
-    &#85;&#110;&#105;&#102;&#105;&#101;&#100; &#100;&#105;&#102;&#102;&#115; &#97;&#114;&#101; &#97; &#99;&#111;&#109;&#112;&#97;&#99;&#116; w&#97;y &#111;&#102; &#115;&#104;&#111;w&#105;&#110;&#103; &#108;&#105;&#110;&#101; &#99;&#104;&#97;&#110;&#103;&#101;&#115; &#97;&#110;&#100; &#97; &#102;&#101;w
-    &#108;&#105;&#110;&#101;&#115; &#111;&#102; &#99;&#111;&#110;&#116;&#101;x&#116;.  &#84;&#104;&#101; &#110;&#117;&#109;&#98;&#101;&#114; &#111;&#102; &#99;&#111;&#110;&#116;&#101;x&#116; &#108;&#105;&#110;&#101;&#115; &#105;&#115; &#115;&#101;&#116; &#98;y '&#110;' w&#104;&#105;&#99;&#104;
-    &#100;&#101;&#102;&#97;&#117;&#108;&#116;&#115; &#116;&#111; &#116;&#104;&#114;&#101;&#101;.
+    Unified diffs are a compact way of showing line changes and a few
+    lines of context.  The number of context lines is set by 'n' which
+    defaults to three.
 </p><p>
-    &#66;y &#100;&#101;&#102;&#97;&#117;&#108;&#116;, &#116;&#104;&#101; &#100;&#105;&#102;&#102; &#99;&#111;&#110;&#116;&#114;&#111;&#108; &#108;&#105;&#110;&#101;&#115; (&#116;&#104;&#111;&#115;&#101; w&#105;&#116;&#104; ---, +++, &#111;&#114; &#64;&#64;) &#97;&#114;&#101;
-    &#99;&#114;&#101;&#97;&#116;&#101;&#100; w&#105;&#116;&#104; &#97; &#116;&#114;&#97;&#105;&#108;&#105;&#110;&#103; &#110;&#101;w&#108;&#105;&#110;&#101;.  &#84;&#104;&#105;&#115; &#105;&#115; &#104;&#101;&#108;&#112;&#102;&#117;&#108; &#115;&#111; &#116;&#104;&#97;&#116; &#105;&#110;&#112;&#117;&#116;&#115;
-    &#99;&#114;&#101;&#97;&#116;&#101;&#100; &#102;&#114;&#111;&#109; &#102;&#105;&#108;&#101;.&#114;&#101;&#97;&#100;&#108;&#105;&#110;&#101;&#115;() &#114;&#101;&#115;&#117;&#108;&#116; &#105;&#110; &#100;&#105;&#102;&#102;&#115; &#116;&#104;&#97;&#116; &#97;&#114;&#101; &#115;&#117;&#105;&#116;&#97;&#98;&#108;&#101; &#102;&#111;&#114;
-    &#102;&#105;&#108;&#101;.w&#114;&#105;&#116;&#101;&#108;&#105;&#110;&#101;&#115;() &#115;&#105;&#110;&#99;&#101; &#98;&#111;&#116;&#104; &#116;&#104;&#101; &#105;&#110;&#112;&#117;&#116;&#115; &#97;&#110;&#100; &#111;&#117;&#116;&#112;&#117;&#116;&#115; &#104;&#97;v&#101; &#116;&#114;&#97;&#105;&#108;&#105;&#110;&#103;
-    &#110;&#101;w&#108;&#105;&#110;&#101;&#115;.
+    By default, the diff control lines (those with ---, +++, or @@) are
+    created with a trailing newline.  This is helpful so that inputs
+    created from file.readlines() result in diffs that are suitable for
+    file.writelines() since both the inputs and outputs have trailing
+    newlines.
 </p><p>
-    &#70;&#111;&#114; &#105;&#110;&#112;&#117;&#116;&#115; &#116;&#104;&#97;&#116; &#100;&#111; &#110;&#111;&#116; &#104;&#97;v&#101; &#116;&#114;&#97;&#105;&#108;&#105;&#110;&#103; &#110;&#101;w&#108;&#105;&#110;&#101;&#115;, &#115;&#101;&#116; &#116;&#104;&#101; &#108;&#105;&#110;&#101;&#116;&#101;&#114;&#109;
-    &#97;&#114;&#103;&#117;&#109;&#101;&#110;&#116; &#116;&#111; "" &#115;&#111; &#116;&#104;&#97;&#116; &#116;&#104;&#101; &#111;&#117;&#116;&#112;&#117;&#116; w&#105;&#108;&#108; &#98;&#101; &#117;&#110;&#105;&#102;&#111;&#114;&#109;&#108;y &#110;&#101;w&#108;&#105;&#110;&#101; &#102;&#114;&#101;&#101;.
+    For inputs that do not have trailing newlines, set the lineterm
+    argument to "" so that the output will be uniformly newline free.
 </p><p>
-    &#84;&#104;&#101; &#117;&#110;&#105;&#100;&#105;&#102;&#102; &#102;&#111;&#114;&#109;&#97;&#116; &#110;&#111;&#114;&#109;&#97;&#108;&#108;y &#104;&#97;&#115; &#97; &#104;&#101;&#97;&#100;&#101;&#114; &#102;&#111;&#114; &#102;&#105;&#108;&#101;&#110;&#97;&#109;&#101;&#115; &#97;&#110;&#100; &#109;&#111;&#100;&#105;&#102;&#105;&#99;&#97;&#116;&#105;&#111;&#110;
-    &#116;&#105;&#109;&#101;&#115;.  &#65;&#110;y &#111;&#114; &#97;&#108;&#108; &#111;&#102; &#116;&#104;&#101;&#115;&#101; &#109;&#97;y &#98;&#101; &#115;&#112;&#101;&#99;&#105;&#102;&#105;&#101;&#100; &#117;&#115;&#105;&#110;&#103; &#115;&#116;&#114;&#105;&#110;&#103;&#115; &#102;&#111;&#114;
-    '&#102;&#114;&#111;&#109;&#102;&#105;&#108;&#101;', '&#116;&#111;&#102;&#105;&#108;&#101;', '&#102;&#114;&#111;&#109;&#102;&#105;&#108;&#101;&#100;&#97;&#116;&#101;', &#97;&#110;&#100; '&#116;&#111;&#102;&#105;&#108;&#101;&#100;&#97;&#116;&#101;'.  &#84;&#104;&#101; &#109;&#111;&#100;&#105;&#102;&#105;&#99;&#97;&#116;&#105;&#111;&#110;
-    &#116;&#105;&#109;&#101;&#115; &#97;&#114;&#101; &#110;&#111;&#114;&#109;&#97;&#108;&#108;y &#101;x&#112;&#114;&#101;&#115;&#115;&#101;&#100; &#105;&#110; &#116;&#104;&#101; &#102;&#111;&#114;&#109;&#97;&#116; &#114;&#101;&#116;&#117;&#114;&#110;&#101;&#100; &#98;y &#116;&#105;&#109;&#101;.&#99;&#116;&#105;&#109;&#101;().
+    The unidiff format normally has a header for filenames and modification
+    times.  Any or all of these may be specified using strings for
+    'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'.  The modification
+    times are normally expressed in the format returned by time.ctime().
 </p><p>
-    &#69;x&#97;&#109;&#112;&#108;&#101;&#58;
+    Example:
 </p><p>
-    &#60;&#112;&#114;&#101;&#62;
-    &&#103;&#116;&#59;&&#103;&#116;&#59;&&#103;&#116;&#59; &#102;&#111;&#114; &#108;&#105;&#110;&#101; &#105;&#110; &#117;&#110;&#105;&#102;&#105;&#101;&#100;&#95;&#100;&#105;&#102;&#102;('&#111;&#110;&#101; &#116;w&#111; &#116;&#104;&#114;&#101;&#101; &#102;&#111;&#117;&#114;'.&#115;&#112;&#108;&#105;&#116;(),
-    ...             'z&#101;&#114;&#111; &#111;&#110;&#101; &#116;&#114;&#101;&#101; &#102;&#111;&#117;&#114;'.&#115;&#112;&#108;&#105;&#116;(), '&#79;&#114;&#105;&#103;&#105;&#110;&#97;&#108;', '&#67;&#117;&#114;&#114;&#101;&#110;&#116;',
-    ...             '&#83;&#97;&#116; &#74;&#97;&#110; &#50;&#54; &#50;&#51;&#58;&#51;&#48;&#58;&#53;&#48; &#49;&#57;&#57;&#49;', '&#70;&#114;&#105; &#74;&#117;&#110; &#48;&#54; &#49;&#48;&#58;&#50;&#48;&#58;&#53;&#50; &#50;&#48;&#48;&#51;',
-    ...             &#108;&#105;&#110;&#101;&#116;&#101;&#114;&#109;&#61;'')&#58;
-    ...     &#112;&#114;&#105;&#110;&#116; &#108;&#105;&#110;&#101;
-    --- &#79;&#114;&#105;&#103;&#105;&#110;&#97;&#108; &#83;&#97;&#116; &#74;&#97;&#110; &#50;&#54; &#50;&#51;&#58;&#51;&#48;&#58;&#53;&#48; &#49;&#57;&#57;&#49;
-    +++ &#67;&#117;&#114;&#114;&#101;&#110;&#116; &#70;&#114;&#105; &#74;&#117;&#110; &#48;&#54; &#49;&#48;&#58;&#50;&#48;&#58;&#53;&#50; &#50;&#48;&#48;&#51;
-&#64; -&#49;,&#52; +&#49;,&#52; &#64;&#64;
-    +z&#101;&#114;&#111;
-     &#111;&#110;&#101;
-    -&#116;w&#111;
-    -&#116;&#104;&#114;&#101;&#101;
-    +&#116;&#114;&#101;&#101;
-     &#102;&#111;&#117;&#114;
-    &#60;/&#112;&#114;&#101;&#62;
+    <pre>
+    &gt;&gt;&gt; for line in unified_diff('one two three four'.split(),
+    ...             'zero one tree four'.split(), 'Original', 'Current',
+    ...             'Sat Jan 26 23:30:50 1991', 'Fri Jun 06 10:20:52 2003',
+    ...             lineterm=''):
+    ...     print line
+    --- Original Sat Jan 26 23:30:50 1991
+    +++ Current Fri Jun 06 10:20:52 2003
+@ -1,4 +1,4 @@
+    +zero
+     one
+    -two
+    -three
+    +tree
+     four
+    </pre>
 </p><dl>
 <dt><i>a</i></dt>
 <dd>
-&#102;&#105;&#114;&#115;&#116; &#115;&#101;&#113;&#117;&#101;&#110;&#99;&#101; &#111;&#102; &#108;&#105;&#110;&#101;&#115; (&#108;&#105;&#115;&#116; &#111;&#102; &#115;&#116;&#114;&#105;&#110;&#103;&#115;)
+first sequence of lines (list of strings)
 </dd><dt><i>b</i></dt>
 <dd>
-&#115;&#101;&#99;&#111;&#110;&#100; &#115;&#101;&#113;&#117;&#101;&#110;&#99;&#101; &#111;&#102; &#108;&#105;&#110;&#101;&#115; (&#108;&#105;&#115;&#116; &#111;&#102; &#115;&#116;&#114;&#105;&#110;&#103;&#115;)
+second sequence of lines (list of strings)
 </dd><dt><i>fromfile</i></dt>
 <dd>
-&#102;&#105;&#108;&#101;&#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#102;&#105;&#114;&#115;&#116; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+filename of the first file (string)
 </dd><dt><i>tofile</i></dt>
 <dd>
-&#102;&#105;&#108;&#101;&#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#115;&#101;&#99;&#111;&#110;&#100; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+filename of the second file (string)
 </dd><dt><i>fromfiledate</i></dt>
 <dd>
-&#109;&#111;&#100;&#105;&#102;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#116;&#105;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#102;&#105;&#114;&#115;&#116; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+modification time of the first file (string)
 </dd><dt><i>tofiledate</i></dt>
 <dd>
-&#109;&#111;&#100;&#105;&#102;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#116;&#105;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#115;&#101;&#99;&#111;&#110;&#100; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+modification time of the second file (string)
 </dd><dt><i>n</i></dt>
 <dd>
-&#110;&#117;&#109;&#98;&#101;&#114; &#111;&#102; &#108;&#105;&#110;&#101;&#115; &#111;&#102; &#99;&#111;&#110;&#116;&#101;x&#116; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;)
+number of lines of context (integer)
 </dd><dt><i>lineterm</i></dt>
 <dd>
-&#108;&#105;&#110;&#101; &#116;&#101;&#114;&#109;&#105;&#110;&#97;&#116;&#105;&#111;&#110; &#115;&#116;&#114;&#105;&#110;&#103; (&#115;&#116;&#114;&#105;&#110;&#103;)
+line termination string (string)
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-&#97; &#103;&#101;&#110;&#101;&#114;&#97;&#116;&#111;&#114; y&#105;&#101;&#108;&#100;&#105;&#110;&#103; &#108;&#105;&#110;&#101;&#115; &#111;&#102; &#100;&#105;&#102;&#102;&#101;&#114;&#101;&#110;&#99;&#101;&#115;
+a generator yielding lines of differences
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>

eric ide

mercurial