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