1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Plugins.UiExtensionPlugins.PipInterface.PipDialog</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.Plugins.UiExtensionPlugins.PipInterface.PipDialog</h1> |
|
23 <p> |
|
24 Module implementing a dialog showing the output of a pip command. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#PipDialog">PipDialog</a></td> |
|
34 <td>Class implementing a dialog showing the output of a 'python -m pip' command.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="PipDialog" ID="PipDialog"></a> |
|
43 <h2>PipDialog</h2> |
|
44 <p> |
|
45 Class implementing a dialog showing the output of a 'python -m pip' |
|
46 command. |
|
47 </p> |
|
48 <h3>Derived from</h3> |
|
49 QDialog, Ui_PipDialog |
|
50 <h3>Class Attributes</h3> |
|
51 <table> |
|
52 <tr><td>None</td></tr> |
|
53 </table> |
|
54 <h3>Class Methods</h3> |
|
55 <table> |
|
56 <tr><td>None</td></tr> |
|
57 </table> |
|
58 <h3>Methods</h3> |
|
59 <table> |
|
60 <tr> |
|
61 <td><a href="#PipDialog.__init__">PipDialog</a></td> |
|
62 <td>Constructor</td> |
|
63 </tr><tr> |
|
64 <td><a href="#PipDialog.__addOutput">__addOutput</a></td> |
|
65 <td>Private method to add some text to the output pane.</td> |
|
66 </tr><tr> |
|
67 <td><a href="#PipDialog.__finish">__finish</a></td> |
|
68 <td>Private slot called when the process finished or the user pressed the button.</td> |
|
69 </tr><tr> |
|
70 <td><a href="#PipDialog.__procFinished">__procFinished</a></td> |
|
71 <td>Private slot connected to the finished signal.</td> |
|
72 </tr><tr> |
|
73 <td><a href="#PipDialog.__readStderr">__readStderr</a></td> |
|
74 <td>Private slot to handle the readyReadStandardError signal.</td> |
|
75 </tr><tr> |
|
76 <td><a href="#PipDialog.__readStdout">__readStdout</a></td> |
|
77 <td>Private slot to handle the readyReadStandardOutput signal.</td> |
|
78 </tr><tr> |
|
79 <td><a href="#PipDialog.closeEvent">closeEvent</a></td> |
|
80 <td>Protected slot implementing a close event handler.</td> |
|
81 </tr><tr> |
|
82 <td><a href="#PipDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
83 <td>Private slot called by a button of the button box clicked.</td> |
|
84 </tr><tr> |
|
85 <td><a href="#PipDialog.startProcess">startProcess</a></td> |
|
86 <td>Public slot used to start the process.</td> |
|
87 </tr><tr> |
|
88 <td><a href="#PipDialog.startProcesses">startProcesses</a></td> |
|
89 <td>Public method to issue a list of commands to be executed.</td> |
|
90 </tr> |
|
91 </table> |
|
92 <h3>Static Methods</h3> |
|
93 <table> |
|
94 <tr><td>None</td></tr> |
|
95 </table> |
|
96 <a NAME="PipDialog.__init__" ID="PipDialog.__init__"></a> |
|
97 <h4>PipDialog (Constructor)</h4> |
|
98 <b>PipDialog</b>(<i>text, parent=None</i>) |
|
99 <p> |
|
100 Constructor |
|
101 </p><dl> |
|
102 <dt><i>text</i> (str)</dt> |
|
103 <dd> |
|
104 text to be shown by the label |
|
105 </dd><dt><i>parent</i> (QWidget)</dt> |
|
106 <dd> |
|
107 reference to the parent widget |
|
108 </dd> |
|
109 </dl><a NAME="PipDialog.__addOutput" ID="PipDialog.__addOutput"></a> |
|
110 <h4>PipDialog.__addOutput</h4> |
|
111 <b>__addOutput</b>(<i>txt</i>) |
|
112 <p> |
|
113 Private method to add some text to the output pane. |
|
114 </p><dl> |
|
115 <dt><i>txt</i> (str)</dt> |
|
116 <dd> |
|
117 text to be added |
|
118 </dd> |
|
119 </dl><a NAME="PipDialog.__finish" ID="PipDialog.__finish"></a> |
|
120 <h4>PipDialog.__finish</h4> |
|
121 <b>__finish</b>(<i></i>) |
|
122 <p> |
|
123 Private slot called when the process finished or the user pressed |
|
124 the button. |
|
125 </p><a NAME="PipDialog.__procFinished" ID="PipDialog.__procFinished"></a> |
|
126 <h4>PipDialog.__procFinished</h4> |
|
127 <b>__procFinished</b>(<i>exitCode, exitStatus</i>) |
|
128 <p> |
|
129 Private slot connected to the finished signal. |
|
130 </p><dl> |
|
131 <dt><i>exitCode</i> (int)</dt> |
|
132 <dd> |
|
133 exit code of the process |
|
134 </dd><dt><i>exitStatus</i> (QProcess.ExitStatus)</dt> |
|
135 <dd> |
|
136 exit status of the process |
|
137 </dd> |
|
138 </dl><a NAME="PipDialog.__readStderr" ID="PipDialog.__readStderr"></a> |
|
139 <h4>PipDialog.__readStderr</h4> |
|
140 <b>__readStderr</b>(<i></i>) |
|
141 <p> |
|
142 Private slot to handle the readyReadStandardError signal. |
|
143 </p><p> |
|
144 It reads the error output of the process and inserts it into the |
|
145 error pane. |
|
146 </p><a NAME="PipDialog.__readStdout" ID="PipDialog.__readStdout"></a> |
|
147 <h4>PipDialog.__readStdout</h4> |
|
148 <b>__readStdout</b>(<i></i>) |
|
149 <p> |
|
150 Private slot to handle the readyReadStandardOutput signal. |
|
151 </p><p> |
|
152 It reads the output of the process, formats it and inserts it into |
|
153 the contents pane. |
|
154 </p><a NAME="PipDialog.closeEvent" ID="PipDialog.closeEvent"></a> |
|
155 <h4>PipDialog.closeEvent</h4> |
|
156 <b>closeEvent</b>(<i>e</i>) |
|
157 <p> |
|
158 Protected slot implementing a close event handler. |
|
159 </p><dl> |
|
160 <dt><i>e</i> (QCloseEvent)</dt> |
|
161 <dd> |
|
162 close event |
|
163 </dd> |
|
164 </dl><a NAME="PipDialog.on_buttonBox_clicked" ID="PipDialog.on_buttonBox_clicked"></a> |
|
165 <h4>PipDialog.on_buttonBox_clicked</h4> |
|
166 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
167 <p> |
|
168 Private slot called by a button of the button box clicked. |
|
169 </p><dl> |
|
170 <dt><i>button</i> (QAbstractButton)</dt> |
|
171 <dd> |
|
172 button that was clicked |
|
173 </dd> |
|
174 </dl><a NAME="PipDialog.startProcess" ID="PipDialog.startProcess"></a> |
|
175 <h4>PipDialog.startProcess</h4> |
|
176 <b>startProcess</b>(<i>cmd, args, showArgs=True</i>) |
|
177 <p> |
|
178 Public slot used to start the process. |
|
179 </p><dl> |
|
180 <dt><i>cmd</i> (str)</dt> |
|
181 <dd> |
|
182 name of the pip executable to be used |
|
183 </dd><dt><i>args</i> (list of str)</dt> |
|
184 <dd> |
|
185 list of arguments for the process |
|
186 </dd><dt><i>showArgs=</i> (bool)</dt> |
|
187 <dd> |
|
188 flag indicating to show the arguments |
|
189 </dd> |
|
190 </dl><dl> |
|
191 <dt>Returns:</dt> |
|
192 <dd> |
|
193 flag indicating a successful start of the process |
|
194 </dd> |
|
195 </dl><dl> |
|
196 <dt>Return Type:</dt> |
|
197 <dd> |
|
198 bool |
|
199 </dd> |
|
200 </dl><a NAME="PipDialog.startProcesses" ID="PipDialog.startProcesses"></a> |
|
201 <h4>PipDialog.startProcesses</h4> |
|
202 <b>startProcesses</b>(<i>processParams</i>) |
|
203 <p> |
|
204 Public method to issue a list of commands to be executed. |
|
205 </p><dl> |
|
206 <dt><i>processParams</i> (list of tuples of (str, list of str))</dt> |
|
207 <dd> |
|
208 list of tuples containing the command |
|
209 and arguments |
|
210 </dd> |
|
211 </dl><dl> |
|
212 <dt>Returns:</dt> |
|
213 <dd> |
|
214 flag indicating a successful start of the first process |
|
215 </dd> |
|
216 </dl><dl> |
|
217 <dt>Return Type:</dt> |
|
218 <dd> |
|
219 bool |
|
220 </dd> |
|
221 </dl> |
|
222 <div align="right"><a href="#top">Up</a></div> |
|
223 <hr /> |
|
224 </body></html> |
|