eric7/Documentation/Source/eric7.PipInterface.PipPackagesWidget.html

branch
eric7
changeset 8372
e0227a7c850e
child 8466
bb21fd901f49
equal deleted inserted replaced
8371:d6062691d424 8372:e0227a7c850e
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.PipInterface.PipPackagesWidget</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>
22 <a NAME="top" ID="top"></a>
23 <h1>eric7.PipInterface.PipPackagesWidget</h1>
24
25 <p>
26 Module implementing the pip packages management widget.
27 </p>
28 <h3>Global Attributes</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <h3>Classes</h3>
34
35 <table>
36
37 <tr>
38 <td><a href="#PipPackagesWidget">PipPackagesWidget</a></td>
39 <td>Class implementing the pip packages management widget.</td>
40 </tr>
41 <tr>
42 <td><a href="#PypiSearchResultsParser">PypiSearchResultsParser</a></td>
43 <td>Class implementing the parser for the PyPI search result page.</td>
44 </tr>
45 </table>
46 <h3>Functions</h3>
47
48 <table>
49 <tr><td>None</td></tr>
50 </table>
51 <hr />
52 <hr />
53 <a NAME="PipPackagesWidget" ID="PipPackagesWidget"></a>
54 <h2>PipPackagesWidget</h2>
55
56 <p>
57 Class implementing the pip packages management widget.
58 </p>
59 <h3>Derived from</h3>
60 QWidget, Ui_PipPackagesWidget
61 <h3>Class Attributes</h3>
62
63 <table>
64 <tr><td>SearchVersionRole</td></tr><tr><td>ShowProcessClassifiersMode</td></tr><tr><td>ShowProcessEntryPointsMode</td></tr><tr><td>ShowProcessFilesListMode</td></tr><tr><td>ShowProcessGeneralMode</td></tr>
65 </table>
66 <h3>Class Methods</h3>
67
68 <table>
69 <tr><td>None</td></tr>
70 </table>
71 <h3>Methods</h3>
72
73 <table>
74
75 <tr>
76 <td><a href="#PipPackagesWidget.__init__">PipPackagesWidget</a></td>
77 <td>Constructor</td>
78 </tr>
79 <tr>
80 <td><a href="#PipPackagesWidget.__aboutToShowPipMenu">__aboutToShowPipMenu</a></td>
81 <td>Private slot to set the action enabled status.</td>
82 </tr>
83 <tr>
84 <td><a href="#PipPackagesWidget.__allUpdateableItems">__allUpdateableItems</a></td>
85 <td>Private method to get a list of all items that can be updated.</td>
86 </tr>
87 <tr>
88 <td><a href="#PipPackagesWidget.__availablePipVersion">__availablePipVersion</a></td>
89 <td>Private method to get the pip version of the selected environment.</td>
90 </tr>
91 <tr>
92 <td><a href="#PipPackagesWidget.__editConfiguration">__editConfiguration</a></td>
93 <td>Private method to edit a configuration.</td>
94 </tr>
95 <tr>
96 <td><a href="#PipPackagesWidget.__editUserConfiguration">__editUserConfiguration</a></td>
97 <td>Private slot to edit the user configuration.</td>
98 </tr>
99 <tr>
100 <td><a href="#PipPackagesWidget.__editVirtualenvConfiguration">__editVirtualenvConfiguration</a></td>
101 <td>Private slot to edit the configuration of the selected environment.</td>
102 </tr>
103 <tr>
104 <td><a href="#PipPackagesWidget.__finishSearch">__finishSearch</a></td>
105 <td>Private slot performing the search finishing actions.</td>
106 </tr>
107 <tr>
108 <td><a href="#PipPackagesWidget.__generateRequirements">__generateRequirements</a></td>
109 <td>Private slot to generate the contents for a requirements file.</td>
110 </tr>
111 <tr>
112 <td><a href="#PipPackagesWidget.__initPipMenu">__initPipMenu</a></td>
113 <td>Private method to create the super menu and attach it to the super menu button.</td>
114 </tr>
115 <tr>
116 <td><a href="#PipPackagesWidget.__installLocalPackage">__installLocalPackage</a></td>
117 <td>Private slot to install a package available on local storage.</td>
118 </tr>
119 <tr>
120 <td><a href="#PipPackagesWidget.__installPackages">__installPackages</a></td>
121 <td>Private slot to install packages to be given by the user.</td>
122 </tr>
123 <tr>
124 <td><a href="#PipPackagesWidget.__installPip">__installPip</a></td>
125 <td>Private slot to install pip into the selected environment.</td>
126 </tr>
127 <tr>
128 <td><a href="#PipPackagesWidget.__installPipUser">__installPipUser</a></td>
129 <td>Private slot to install pip into the user site for the selected environment.</td>
130 </tr>
131 <tr>
132 <td><a href="#PipPackagesWidget.__installRequirements">__installRequirements</a></td>
133 <td>Private slot to install packages as given in a requirements file.</td>
134 </tr>
135 <tr>
136 <td><a href="#PipPackagesWidget.__isPipAvailable">__isPipAvailable</a></td>
137 <td>Private method to check, if the pip package is available for the selected environment.</td>
138 </tr>
139 <tr>
140 <td><a href="#PipPackagesWidget.__pipConfigure">__pipConfigure</a></td>
141 <td>Private slot to open the configuration page.</td>
142 </tr>
143 <tr>
144 <td><a href="#PipPackagesWidget.__populateEnvironments">__populateEnvironments</a></td>
145 <td>Private method to get a list of environments and populate the selector.</td>
146 </tr>
147 <tr>
148 <td><a href="#PipPackagesWidget.__purgeCache">__purgeCache</a></td>
149 <td>Private slot to empty the pip cache.</td>
150 </tr>
151 <tr>
152 <td><a href="#PipPackagesWidget.__refreshPackagesList">__refreshPackagesList</a></td>
153 <td>Private method to referesh the packages list.</td>
154 </tr>
155 <tr>
156 <td><a href="#PipPackagesWidget.__reinstallPackages">__reinstallPackages</a></td>
157 <td>Private slot to force a re-installation of the selected packages.</td>
158 </tr>
159 <tr>
160 <td><a href="#PipPackagesWidget.__removeCachedFiles">__removeCachedFiles</a></td>
161 <td>Private slot to remove files from the pip cache.</td>
162 </tr>
163 <tr>
164 <td><a href="#PipPackagesWidget.__repairPip">__repairPip</a></td>
165 <td>Private slot to repair the pip installation of the selected environment.</td>
166 </tr>
167 <tr>
168 <td><a href="#PipPackagesWidget.__search">__search</a></td>
169 <td>Private method to perform the search by calling the PyPI search URL.</td>
170 </tr>
171 <tr>
172 <td><a href="#PipPackagesWidget.__searchResponse">__searchResponse</a></td>
173 <td>Private method to extract the search result data from the response.</td>
174 </tr>
175 <tr>
176 <td><a href="#PipPackagesWidget.__selectedUpdateableItems">__selectedUpdateableItems</a></td>
177 <td>Private method to get a list of selected items that can be updated.</td>
178 </tr>
179 <tr>
180 <td><a href="#PipPackagesWidget.__showCacheInfo">__showCacheInfo</a></td>
181 <td>Private slot to show information about the cache.</td>
182 </tr>
183 <tr>
184 <td><a href="#PipPackagesWidget.__showCacheList">__showCacheList</a></td>
185 <td>Private slot to show a list of cached files.</td>
186 </tr>
187 <tr>
188 <td><a href="#PipPackagesWidget.__showPackageDetails">__showPackageDetails</a></td>
189 <td>Private method to populate the package details dialog.</td>
190 </tr>
191 <tr>
192 <td><a href="#PipPackagesWidget.__showSearchedDetails">__showSearchedDetails</a></td>
193 <td>Private slot to show details about the selected search result package.</td>
194 </tr>
195 <tr>
196 <td><a href="#PipPackagesWidget.__uninstallRequirements">__uninstallRequirements</a></td>
197 <td>Private slot to uninstall packages as given in a requirements file.</td>
198 </tr>
199 <tr>
200 <td><a href="#PipPackagesWidget.__updateActionButtons">__updateActionButtons</a></td>
201 <td>Private method to set the state of the action buttons.</td>
202 </tr>
203 <tr>
204 <td><a href="#PipPackagesWidget.__updateSearchActionButtons">__updateSearchActionButtons</a></td>
205 <td>Private method to update the action button states of the search widget.</td>
206 </tr>
207 <tr>
208 <td><a href="#PipPackagesWidget.__updateSearchButton">__updateSearchButton</a></td>
209 <td>Private method to update the state of the search button.</td>
210 </tr>
211 <tr>
212 <td><a href="#PipPackagesWidget.executeInstallPackages">executeInstallPackages</a></td>
213 <td>Public method to install the given list of packages.</td>
214 </tr>
215 <tr>
216 <td><a href="#PipPackagesWidget.executeUninstallPackages">executeUninstallPackages</a></td>
217 <td>Public method to uninstall the given list of packages.</td>
218 </tr>
219 <tr>
220 <td><a href="#PipPackagesWidget.executeUpgradePackages">executeUpgradePackages</a></td>
221 <td>Public method to execute the pip upgrade command.</td>
222 </tr>
223 <tr>
224 <td><a href="#PipPackagesWidget.getPip">getPip</a></td>
225 <td>Public method to get a reference to the pip interface object.</td>
226 </tr>
227 <tr>
228 <td><a href="#PipPackagesWidget.on_environmentsComboBox_currentIndexChanged">on_environmentsComboBox_currentIndexChanged</a></td>
229 <td>Private slot handling the selection of a Python environment.</td>
230 </tr>
231 <tr>
232 <td><a href="#PipPackagesWidget.on_installButton_clicked">on_installButton_clicked</a></td>
233 <td>Private slot to handle pressing the Install button..</td>
234 </tr>
235 <tr>
236 <td><a href="#PipPackagesWidget.on_installUserSiteButton_clicked">on_installUserSiteButton_clicked</a></td>
237 <td>Private slot to handle pressing the Install to User-Site button..</td>
238 </tr>
239 <tr>
240 <td><a href="#PipPackagesWidget.on_installedFilesCheckBox_clicked">on_installedFilesCheckBox_clicked</a></td>
241 <td>Private slot to handle a change of the installed files information checkbox.</td>
242 </tr>
243 <tr>
244 <td><a href="#PipPackagesWidget.on_localCheckBox_clicked">on_localCheckBox_clicked</a></td>
245 <td>Private slot handling the switching of the local mode.</td>
246 </tr>
247 <tr>
248 <td><a href="#PipPackagesWidget.on_notRequiredCheckBox_clicked">on_notRequiredCheckBox_clicked</a></td>
249 <td>Private slot handling the switching of the 'not required' mode.</td>
250 </tr>
251 <tr>
252 <td><a href="#PipPackagesWidget.on_packagesList_itemActivated">on_packagesList_itemActivated</a></td>
253 <td>Private slot reacting on a package item activation.</td>
254 </tr>
255 <tr>
256 <td><a href="#PipPackagesWidget.on_packagesList_itemSelectionChanged">on_packagesList_itemSelectionChanged</a></td>
257 <td>Private slot handling the selection of a package.</td>
258 </tr>
259 <tr>
260 <td><a href="#PipPackagesWidget.on_refreshButton_clicked">on_refreshButton_clicked</a></td>
261 <td>Private slot to refresh the display.</td>
262 </tr>
263 <tr>
264 <td><a href="#PipPackagesWidget.on_searchButton_clicked">on_searchButton_clicked</a></td>
265 <td>Private slot handling a press of the search button.</td>
266 </tr>
267 <tr>
268 <td><a href="#PipPackagesWidget.on_searchEditName_returnPressed">on_searchEditName_returnPressed</a></td>
269 <td>Private slot initiating a search via a press of the Return key.</td>
270 </tr>
271 <tr>
272 <td><a href="#PipPackagesWidget.on_searchEditName_textChanged">on_searchEditName_textChanged</a></td>
273 <td>Private slot handling a change of the search term.</td>
274 </tr>
275 <tr>
276 <td><a href="#PipPackagesWidget.on_searchResultList_itemActivated">on_searchResultList_itemActivated</a></td>
277 <td>Private slot reacting on an search result item activation.</td>
278 </tr>
279 <tr>
280 <td><a href="#PipPackagesWidget.on_searchResultList_itemSelectionChanged">on_searchResultList_itemSelectionChanged</a></td>
281 <td>Private slot handling changes of the search result selection.</td>
282 </tr>
283 <tr>
284 <td><a href="#PipPackagesWidget.on_searchToggleButton_toggled">on_searchToggleButton_toggled</a></td>
285 <td>Private slot to togle the search widget.</td>
286 </tr>
287 <tr>
288 <td><a href="#PipPackagesWidget.on_showDetailsButton_clicked">on_showDetailsButton_clicked</a></td>
289 <td>Private slot to handle pressing the Show Details button.</td>
290 </tr>
291 <tr>
292 <td><a href="#PipPackagesWidget.on_showPackageDetailsButton_clicked">on_showPackageDetailsButton_clicked</a></td>
293 <td>Private slot to show information for the selected package.</td>
294 </tr>
295 <tr>
296 <td><a href="#PipPackagesWidget.on_uninstallButton_clicked">on_uninstallButton_clicked</a></td>
297 <td>Private slot to remove selected packages of the selected environment.</td>
298 </tr>
299 <tr>
300 <td><a href="#PipPackagesWidget.on_upgradeAllButton_clicked">on_upgradeAllButton_clicked</a></td>
301 <td>Private slot to upgrade all packages of the selected environment.</td>
302 </tr>
303 <tr>
304 <td><a href="#PipPackagesWidget.on_upgradeButton_clicked">on_upgradeButton_clicked</a></td>
305 <td>Private slot to upgrade selected packages of the selected environment.</td>
306 </tr>
307 <tr>
308 <td><a href="#PipPackagesWidget.on_userCheckBox_clicked">on_userCheckBox_clicked</a></td>
309 <td>Private slot handling the switching of the 'user-site' mode.</td>
310 </tr>
311 <tr>
312 <td><a href="#PipPackagesWidget.on_verboseCheckBox_clicked">on_verboseCheckBox_clicked</a></td>
313 <td>Private slot to handle a change of the verbose package information checkbox.</td>
314 </tr>
315 </table>
316 <h3>Static Methods</h3>
317
318 <table>
319 <tr><td>None</td></tr>
320 </table>
321
322 <a NAME="PipPackagesWidget.__init__" ID="PipPackagesWidget.__init__"></a>
323 <h4>PipPackagesWidget (Constructor)</h4>
324 <b>PipPackagesWidget</b>(<i>pip, parent=None</i>)
325
326 <p>
327 Constructor
328 </p>
329 <dl>
330
331 <dt><i>pip</i> (Pip)</dt>
332 <dd>
333 reference to the global pip interface
334 </dd>
335 <dt><i>parent</i> (QWidget)</dt>
336 <dd>
337 reference to the parent widget
338 </dd>
339 </dl>
340 <a NAME="PipPackagesWidget.__aboutToShowPipMenu" ID="PipPackagesWidget.__aboutToShowPipMenu"></a>
341 <h4>PipPackagesWidget.__aboutToShowPipMenu</h4>
342 <b>__aboutToShowPipMenu</b>(<i></i>)
343
344 <p>
345 Private slot to set the action enabled status.
346 </p>
347 <a NAME="PipPackagesWidget.__allUpdateableItems" ID="PipPackagesWidget.__allUpdateableItems"></a>
348 <h4>PipPackagesWidget.__allUpdateableItems</h4>
349 <b>__allUpdateableItems</b>(<i></i>)
350
351 <p>
352 Private method to get a list of all items that can be updated.
353 </p>
354 <dl>
355 <dt>Return:</dt>
356 <dd>
357 list of all items that can be updated
358 </dd>
359 </dl>
360 <dl>
361 <dt>Return Type:</dt>
362 <dd>
363 list of QTreeWidgetItem
364 </dd>
365 </dl>
366 <a NAME="PipPackagesWidget.__availablePipVersion" ID="PipPackagesWidget.__availablePipVersion"></a>
367 <h4>PipPackagesWidget.__availablePipVersion</h4>
368 <b>__availablePipVersion</b>(<i></i>)
369
370 <p>
371 Private method to get the pip version of the selected environment.
372 </p>
373 <dl>
374 <dt>Return:</dt>
375 <dd>
376 tuple containing the version number or tuple with all zeros
377 in case pip is not available
378 </dd>
379 </dl>
380 <dl>
381 <dt>Return Type:</dt>
382 <dd>
383 tuple of int
384 </dd>
385 </dl>
386 <a NAME="PipPackagesWidget.__editConfiguration" ID="PipPackagesWidget.__editConfiguration"></a>
387 <h4>PipPackagesWidget.__editConfiguration</h4>
388 <b>__editConfiguration</b>(<i>venvName=""</i>)
389
390 <p>
391 Private method to edit a configuration.
392 </p>
393 <dl>
394
395 <dt><i>venvName</i> (str)</dt>
396 <dd>
397 name of the environment to act upon
398 </dd>
399 </dl>
400 <a NAME="PipPackagesWidget.__editUserConfiguration" ID="PipPackagesWidget.__editUserConfiguration"></a>
401 <h4>PipPackagesWidget.__editUserConfiguration</h4>
402 <b>__editUserConfiguration</b>(<i></i>)
403
404 <p>
405 Private slot to edit the user configuration.
406 </p>
407 <a NAME="PipPackagesWidget.__editVirtualenvConfiguration" ID="PipPackagesWidget.__editVirtualenvConfiguration"></a>
408 <h4>PipPackagesWidget.__editVirtualenvConfiguration</h4>
409 <b>__editVirtualenvConfiguration</b>(<i></i>)
410
411 <p>
412 Private slot to edit the configuration of the selected environment.
413 </p>
414 <a NAME="PipPackagesWidget.__finishSearch" ID="PipPackagesWidget.__finishSearch"></a>
415 <h4>PipPackagesWidget.__finishSearch</h4>
416 <b>__finishSearch</b>(<i></i>)
417
418 <p>
419 Private slot performing the search finishing actions.
420 </p>
421 <a NAME="PipPackagesWidget.__generateRequirements" ID="PipPackagesWidget.__generateRequirements"></a>
422 <h4>PipPackagesWidget.__generateRequirements</h4>
423 <b>__generateRequirements</b>(<i></i>)
424
425 <p>
426 Private slot to generate the contents for a requirements file.
427 </p>
428 <a NAME="PipPackagesWidget.__initPipMenu" ID="PipPackagesWidget.__initPipMenu"></a>
429 <h4>PipPackagesWidget.__initPipMenu</h4>
430 <b>__initPipMenu</b>(<i></i>)
431
432 <p>
433 Private method to create the super menu and attach it to the super
434 menu button.
435 </p>
436 <a NAME="PipPackagesWidget.__installLocalPackage" ID="PipPackagesWidget.__installLocalPackage"></a>
437 <h4>PipPackagesWidget.__installLocalPackage</h4>
438 <b>__installLocalPackage</b>(<i></i>)
439
440 <p>
441 Private slot to install a package available on local storage.
442 </p>
443 <a NAME="PipPackagesWidget.__installPackages" ID="PipPackagesWidget.__installPackages"></a>
444 <h4>PipPackagesWidget.__installPackages</h4>
445 <b>__installPackages</b>(<i></i>)
446
447 <p>
448 Private slot to install packages to be given by the user.
449 </p>
450 <a NAME="PipPackagesWidget.__installPip" ID="PipPackagesWidget.__installPip"></a>
451 <h4>PipPackagesWidget.__installPip</h4>
452 <b>__installPip</b>(<i></i>)
453
454 <p>
455 Private slot to install pip into the selected environment.
456 </p>
457 <a NAME="PipPackagesWidget.__installPipUser" ID="PipPackagesWidget.__installPipUser"></a>
458 <h4>PipPackagesWidget.__installPipUser</h4>
459 <b>__installPipUser</b>(<i></i>)
460
461 <p>
462 Private slot to install pip into the user site for the selected
463 environment.
464 </p>
465 <a NAME="PipPackagesWidget.__installRequirements" ID="PipPackagesWidget.__installRequirements"></a>
466 <h4>PipPackagesWidget.__installRequirements</h4>
467 <b>__installRequirements</b>(<i></i>)
468
469 <p>
470 Private slot to install packages as given in a requirements file.
471 </p>
472 <a NAME="PipPackagesWidget.__isPipAvailable" ID="PipPackagesWidget.__isPipAvailable"></a>
473 <h4>PipPackagesWidget.__isPipAvailable</h4>
474 <b>__isPipAvailable</b>(<i></i>)
475
476 <p>
477 Private method to check, if the pip package is available for the
478 selected environment.
479 </p>
480 <dl>
481 <dt>Return:</dt>
482 <dd>
483 flag indicating availability
484 </dd>
485 </dl>
486 <dl>
487 <dt>Return Type:</dt>
488 <dd>
489 bool
490 </dd>
491 </dl>
492 <a NAME="PipPackagesWidget.__pipConfigure" ID="PipPackagesWidget.__pipConfigure"></a>
493 <h4>PipPackagesWidget.__pipConfigure</h4>
494 <b>__pipConfigure</b>(<i></i>)
495
496 <p>
497 Private slot to open the configuration page.
498 </p>
499 <a NAME="PipPackagesWidget.__populateEnvironments" ID="PipPackagesWidget.__populateEnvironments"></a>
500 <h4>PipPackagesWidget.__populateEnvironments</h4>
501 <b>__populateEnvironments</b>(<i></i>)
502
503 <p>
504 Private method to get a list of environments and populate the selector.
505 </p>
506 <a NAME="PipPackagesWidget.__purgeCache" ID="PipPackagesWidget.__purgeCache"></a>
507 <h4>PipPackagesWidget.__purgeCache</h4>
508 <b>__purgeCache</b>(<i></i>)
509
510 <p>
511 Private slot to empty the pip cache.
512 </p>
513 <a NAME="PipPackagesWidget.__refreshPackagesList" ID="PipPackagesWidget.__refreshPackagesList"></a>
514 <h4>PipPackagesWidget.__refreshPackagesList</h4>
515 <b>__refreshPackagesList</b>(<i></i>)
516
517 <p>
518 Private method to referesh the packages list.
519 </p>
520 <a NAME="PipPackagesWidget.__reinstallPackages" ID="PipPackagesWidget.__reinstallPackages"></a>
521 <h4>PipPackagesWidget.__reinstallPackages</h4>
522 <b>__reinstallPackages</b>(<i></i>)
523
524 <p>
525 Private slot to force a re-installation of the selected packages.
526 </p>
527 <a NAME="PipPackagesWidget.__removeCachedFiles" ID="PipPackagesWidget.__removeCachedFiles"></a>
528 <h4>PipPackagesWidget.__removeCachedFiles</h4>
529 <b>__removeCachedFiles</b>(<i></i>)
530
531 <p>
532 Private slot to remove files from the pip cache.
533 </p>
534 <a NAME="PipPackagesWidget.__repairPip" ID="PipPackagesWidget.__repairPip"></a>
535 <h4>PipPackagesWidget.__repairPip</h4>
536 <b>__repairPip</b>(<i></i>)
537
538 <p>
539 Private slot to repair the pip installation of the selected
540 environment.
541 </p>
542 <a NAME="PipPackagesWidget.__search" ID="PipPackagesWidget.__search"></a>
543 <h4>PipPackagesWidget.__search</h4>
544 <b>__search</b>(<i></i>)
545
546 <p>
547 Private method to perform the search by calling the PyPI search URL.
548 </p>
549 <a NAME="PipPackagesWidget.__searchResponse" ID="PipPackagesWidget.__searchResponse"></a>
550 <h4>PipPackagesWidget.__searchResponse</h4>
551 <b>__searchResponse</b>(<i>reply</i>)
552
553 <p>
554 Private method to extract the search result data from the response.
555 </p>
556 <dl>
557
558 <dt><i>reply</i> (QNetworkReply)</dt>
559 <dd>
560 reference to the reply object containing the data
561 </dd>
562 </dl>
563 <a NAME="PipPackagesWidget.__selectedUpdateableItems" ID="PipPackagesWidget.__selectedUpdateableItems"></a>
564 <h4>PipPackagesWidget.__selectedUpdateableItems</h4>
565 <b>__selectedUpdateableItems</b>(<i></i>)
566
567 <p>
568 Private method to get a list of selected items that can be updated.
569 </p>
570 <dl>
571 <dt>Return:</dt>
572 <dd>
573 list of selected items that can be updated
574 </dd>
575 </dl>
576 <dl>
577 <dt>Return Type:</dt>
578 <dd>
579 list of QTreeWidgetItem
580 </dd>
581 </dl>
582 <a NAME="PipPackagesWidget.__showCacheInfo" ID="PipPackagesWidget.__showCacheInfo"></a>
583 <h4>PipPackagesWidget.__showCacheInfo</h4>
584 <b>__showCacheInfo</b>(<i></i>)
585
586 <p>
587 Private slot to show information about the cache.
588 </p>
589 <a NAME="PipPackagesWidget.__showCacheList" ID="PipPackagesWidget.__showCacheList"></a>
590 <h4>PipPackagesWidget.__showCacheList</h4>
591 <b>__showCacheList</b>(<i></i>)
592
593 <p>
594 Private slot to show a list of cached files.
595 </p>
596 <a NAME="PipPackagesWidget.__showPackageDetails" ID="PipPackagesWidget.__showPackageDetails"></a>
597 <h4>PipPackagesWidget.__showPackageDetails</h4>
598 <b>__showPackageDetails</b>(<i>packageName, packageVersion, upgradable=False, installable=False</i>)
599
600 <p>
601 Private method to populate the package details dialog.
602 </p>
603 <dl>
604
605 <dt><i>packageName</i> (str)</dt>
606 <dd>
607 name of the package to show details for
608 </dd>
609 <dt><i>packageVersion</i> (str)</dt>
610 <dd>
611 version of the package
612 </dd>
613 <dt><i>upgradable</i> (bool (optional))</dt>
614 <dd>
615 flag indicating that the package may be upgraded
616 (defaults to False)
617 </dd>
618 <dt><i>installable</i> (bool (optional))</dt>
619 <dd>
620 flag indicating that the package may be installed
621 (defaults to False)
622 </dd>
623 </dl>
624 <a NAME="PipPackagesWidget.__showSearchedDetails" ID="PipPackagesWidget.__showSearchedDetails"></a>
625 <h4>PipPackagesWidget.__showSearchedDetails</h4>
626 <b>__showSearchedDetails</b>(<i>item=None</i>)
627
628 <p>
629 Private slot to show details about the selected search result package.
630 </p>
631 <dl>
632
633 <dt><i>item</i> (QTreeWidgetItem)</dt>
634 <dd>
635 reference to the search result item to show details for
636 </dd>
637 </dl>
638 <a NAME="PipPackagesWidget.__uninstallRequirements" ID="PipPackagesWidget.__uninstallRequirements"></a>
639 <h4>PipPackagesWidget.__uninstallRequirements</h4>
640 <b>__uninstallRequirements</b>(<i></i>)
641
642 <p>
643 Private slot to uninstall packages as given in a requirements file.
644 </p>
645 <a NAME="PipPackagesWidget.__updateActionButtons" ID="PipPackagesWidget.__updateActionButtons"></a>
646 <h4>PipPackagesWidget.__updateActionButtons</h4>
647 <b>__updateActionButtons</b>(<i></i>)
648
649 <p>
650 Private method to set the state of the action buttons.
651 </p>
652 <a NAME="PipPackagesWidget.__updateSearchActionButtons" ID="PipPackagesWidget.__updateSearchActionButtons"></a>
653 <h4>PipPackagesWidget.__updateSearchActionButtons</h4>
654 <b>__updateSearchActionButtons</b>(<i></i>)
655
656 <p>
657 Private method to update the action button states of the search widget.
658 </p>
659 <a NAME="PipPackagesWidget.__updateSearchButton" ID="PipPackagesWidget.__updateSearchButton"></a>
660 <h4>PipPackagesWidget.__updateSearchButton</h4>
661 <b>__updateSearchButton</b>(<i></i>)
662
663 <p>
664 Private method to update the state of the search button.
665 </p>
666 <a NAME="PipPackagesWidget.executeInstallPackages" ID="PipPackagesWidget.executeInstallPackages"></a>
667 <h4>PipPackagesWidget.executeInstallPackages</h4>
668 <b>executeInstallPackages</b>(<i>packages, userSite=False</i>)
669
670 <p>
671 Public method to install the given list of packages.
672 </p>
673 <dl>
674
675 <dt><i>packages</i> (list of str)</dt>
676 <dd>
677 list of package names to be installed
678 </dd>
679 <dt><i>userSite</i> (bool)</dt>
680 <dd>
681 flag indicating to install to the user directory
682 </dd>
683 </dl>
684 <a NAME="PipPackagesWidget.executeUninstallPackages" ID="PipPackagesWidget.executeUninstallPackages"></a>
685 <h4>PipPackagesWidget.executeUninstallPackages</h4>
686 <b>executeUninstallPackages</b>(<i>packages</i>)
687
688 <p>
689 Public method to uninstall the given list of packages.
690 </p>
691 <dl>
692
693 <dt><i>packages</i> (list of str)</dt>
694 <dd>
695 list of package names to be uninstalled
696 </dd>
697 </dl>
698 <a NAME="PipPackagesWidget.executeUpgradePackages" ID="PipPackagesWidget.executeUpgradePackages"></a>
699 <h4>PipPackagesWidget.executeUpgradePackages</h4>
700 <b>executeUpgradePackages</b>(<i>packages</i>)
701
702 <p>
703 Public method to execute the pip upgrade command.
704 </p>
705 <dl>
706
707 <dt><i>packages</i> (list of str)</dt>
708 <dd>
709 list of package names to be upgraded
710 </dd>
711 </dl>
712 <a NAME="PipPackagesWidget.getPip" ID="PipPackagesWidget.getPip"></a>
713 <h4>PipPackagesWidget.getPip</h4>
714 <b>getPip</b>(<i></i>)
715
716 <p>
717 Public method to get a reference to the pip interface object.
718 </p>
719 <dl>
720 <dt>Return:</dt>
721 <dd>
722 reference to the pip interface object
723 </dd>
724 </dl>
725 <dl>
726 <dt>Return Type:</dt>
727 <dd>
728 Pip
729 </dd>
730 </dl>
731 <a NAME="PipPackagesWidget.on_environmentsComboBox_currentIndexChanged" ID="PipPackagesWidget.on_environmentsComboBox_currentIndexChanged"></a>
732 <h4>PipPackagesWidget.on_environmentsComboBox_currentIndexChanged</h4>
733 <b>on_environmentsComboBox_currentIndexChanged</b>(<i>index</i>)
734
735 <p>
736 Private slot handling the selection of a Python environment.
737 </p>
738 <dl>
739
740 <dt><i>index</i> (int)</dt>
741 <dd>
742 index of the selected Python environment
743 </dd>
744 </dl>
745 <a NAME="PipPackagesWidget.on_installButton_clicked" ID="PipPackagesWidget.on_installButton_clicked"></a>
746 <h4>PipPackagesWidget.on_installButton_clicked</h4>
747 <b>on_installButton_clicked</b>(<i></i>)
748
749 <p>
750 Private slot to handle pressing the Install button..
751 </p>
752 <a NAME="PipPackagesWidget.on_installUserSiteButton_clicked" ID="PipPackagesWidget.on_installUserSiteButton_clicked"></a>
753 <h4>PipPackagesWidget.on_installUserSiteButton_clicked</h4>
754 <b>on_installUserSiteButton_clicked</b>(<i></i>)
755
756 <p>
757 Private slot to handle pressing the Install to User-Site button..
758 </p>
759 <a NAME="PipPackagesWidget.on_installedFilesCheckBox_clicked" ID="PipPackagesWidget.on_installedFilesCheckBox_clicked"></a>
760 <h4>PipPackagesWidget.on_installedFilesCheckBox_clicked</h4>
761 <b>on_installedFilesCheckBox_clicked</b>(<i>checked</i>)
762
763 <p>
764 Private slot to handle a change of the installed files information
765 checkbox.
766 </p>
767 <dl>
768
769 <dt><i>checked</i> (bool)</dt>
770 <dd>
771 state of the checkbox
772 </dd>
773 </dl>
774 <a NAME="PipPackagesWidget.on_localCheckBox_clicked" ID="PipPackagesWidget.on_localCheckBox_clicked"></a>
775 <h4>PipPackagesWidget.on_localCheckBox_clicked</h4>
776 <b>on_localCheckBox_clicked</b>(<i>checked</i>)
777
778 <p>
779 Private slot handling the switching of the local mode.
780 </p>
781 <dl>
782
783 <dt><i>checked</i> (bool)</dt>
784 <dd>
785 state of the local check box
786 </dd>
787 </dl>
788 <a NAME="PipPackagesWidget.on_notRequiredCheckBox_clicked" ID="PipPackagesWidget.on_notRequiredCheckBox_clicked"></a>
789 <h4>PipPackagesWidget.on_notRequiredCheckBox_clicked</h4>
790 <b>on_notRequiredCheckBox_clicked</b>(<i>checked</i>)
791
792 <p>
793 Private slot handling the switching of the 'not required' mode.
794 </p>
795 <dl>
796
797 <dt><i>checked</i> (bool)</dt>
798 <dd>
799 state of the 'not required' check box
800 </dd>
801 </dl>
802 <a NAME="PipPackagesWidget.on_packagesList_itemActivated" ID="PipPackagesWidget.on_packagesList_itemActivated"></a>
803 <h4>PipPackagesWidget.on_packagesList_itemActivated</h4>
804 <b>on_packagesList_itemActivated</b>(<i>item, column</i>)
805
806 <p>
807 Private slot reacting on a package item activation.
808 </p>
809 <dl>
810
811 <dt><i>item</i> (QTreeWidgetItem)</dt>
812 <dd>
813 reference to the activated item
814 </dd>
815 <dt><i>column</i> (int)</dt>
816 <dd>
817 activated column
818 </dd>
819 </dl>
820 <a NAME="PipPackagesWidget.on_packagesList_itemSelectionChanged" ID="PipPackagesWidget.on_packagesList_itemSelectionChanged"></a>
821 <h4>PipPackagesWidget.on_packagesList_itemSelectionChanged</h4>
822 <b>on_packagesList_itemSelectionChanged</b>(<i></i>)
823
824 <p>
825 Private slot handling the selection of a package.
826 </p>
827 <a NAME="PipPackagesWidget.on_refreshButton_clicked" ID="PipPackagesWidget.on_refreshButton_clicked"></a>
828 <h4>PipPackagesWidget.on_refreshButton_clicked</h4>
829 <b>on_refreshButton_clicked</b>(<i></i>)
830
831 <p>
832 Private slot to refresh the display.
833 </p>
834 <a NAME="PipPackagesWidget.on_searchButton_clicked" ID="PipPackagesWidget.on_searchButton_clicked"></a>
835 <h4>PipPackagesWidget.on_searchButton_clicked</h4>
836 <b>on_searchButton_clicked</b>(<i></i>)
837
838 <p>
839 Private slot handling a press of the search button.
840 </p>
841 <a NAME="PipPackagesWidget.on_searchEditName_returnPressed" ID="PipPackagesWidget.on_searchEditName_returnPressed"></a>
842 <h4>PipPackagesWidget.on_searchEditName_returnPressed</h4>
843 <b>on_searchEditName_returnPressed</b>(<i></i>)
844
845 <p>
846 Private slot initiating a search via a press of the Return key.
847 </p>
848 <a NAME="PipPackagesWidget.on_searchEditName_textChanged" ID="PipPackagesWidget.on_searchEditName_textChanged"></a>
849 <h4>PipPackagesWidget.on_searchEditName_textChanged</h4>
850 <b>on_searchEditName_textChanged</b>(<i>txt</i>)
851
852 <p>
853 Private slot handling a change of the search term.
854 </p>
855 <dl>
856
857 <dt><i>txt</i> (str)</dt>
858 <dd>
859 search term
860 </dd>
861 </dl>
862 <a NAME="PipPackagesWidget.on_searchResultList_itemActivated" ID="PipPackagesWidget.on_searchResultList_itemActivated"></a>
863 <h4>PipPackagesWidget.on_searchResultList_itemActivated</h4>
864 <b>on_searchResultList_itemActivated</b>(<i>item, column</i>)
865
866 <p>
867 Private slot reacting on an search result item activation.
868 </p>
869 <dl>
870
871 <dt><i>item</i> (QTreeWidgetItem)</dt>
872 <dd>
873 reference to the activated item
874 </dd>
875 <dt><i>column</i> (int)</dt>
876 <dd>
877 activated column
878 </dd>
879 </dl>
880 <a NAME="PipPackagesWidget.on_searchResultList_itemSelectionChanged" ID="PipPackagesWidget.on_searchResultList_itemSelectionChanged"></a>
881 <h4>PipPackagesWidget.on_searchResultList_itemSelectionChanged</h4>
882 <b>on_searchResultList_itemSelectionChanged</b>(<i></i>)
883
884 <p>
885 Private slot handling changes of the search result selection.
886 </p>
887 <a NAME="PipPackagesWidget.on_searchToggleButton_toggled" ID="PipPackagesWidget.on_searchToggleButton_toggled"></a>
888 <h4>PipPackagesWidget.on_searchToggleButton_toggled</h4>
889 <b>on_searchToggleButton_toggled</b>(<i>checked</i>)
890
891 <p>
892 Private slot to togle the search widget.
893 </p>
894 <dl>
895
896 <dt><i>checked</i> (bool)</dt>
897 <dd>
898 state of the search widget button
899 </dd>
900 </dl>
901 <a NAME="PipPackagesWidget.on_showDetailsButton_clicked" ID="PipPackagesWidget.on_showDetailsButton_clicked"></a>
902 <h4>PipPackagesWidget.on_showDetailsButton_clicked</h4>
903 <b>on_showDetailsButton_clicked</b>(<i></i>)
904
905 <p>
906 Private slot to handle pressing the Show Details button.
907 </p>
908 <a NAME="PipPackagesWidget.on_showPackageDetailsButton_clicked" ID="PipPackagesWidget.on_showPackageDetailsButton_clicked"></a>
909 <h4>PipPackagesWidget.on_showPackageDetailsButton_clicked</h4>
910 <b>on_showPackageDetailsButton_clicked</b>(<i></i>)
911
912 <p>
913 Private slot to show information for the selected package.
914 </p>
915 <a NAME="PipPackagesWidget.on_uninstallButton_clicked" ID="PipPackagesWidget.on_uninstallButton_clicked"></a>
916 <h4>PipPackagesWidget.on_uninstallButton_clicked</h4>
917 <b>on_uninstallButton_clicked</b>(<i></i>)
918
919 <p>
920 Private slot to remove selected packages of the selected environment.
921 </p>
922 <a NAME="PipPackagesWidget.on_upgradeAllButton_clicked" ID="PipPackagesWidget.on_upgradeAllButton_clicked"></a>
923 <h4>PipPackagesWidget.on_upgradeAllButton_clicked</h4>
924 <b>on_upgradeAllButton_clicked</b>(<i></i>)
925
926 <p>
927 Private slot to upgrade all packages of the selected environment.
928 </p>
929 <a NAME="PipPackagesWidget.on_upgradeButton_clicked" ID="PipPackagesWidget.on_upgradeButton_clicked"></a>
930 <h4>PipPackagesWidget.on_upgradeButton_clicked</h4>
931 <b>on_upgradeButton_clicked</b>(<i></i>)
932
933 <p>
934 Private slot to upgrade selected packages of the selected environment.
935 </p>
936 <a NAME="PipPackagesWidget.on_userCheckBox_clicked" ID="PipPackagesWidget.on_userCheckBox_clicked"></a>
937 <h4>PipPackagesWidget.on_userCheckBox_clicked</h4>
938 <b>on_userCheckBox_clicked</b>(<i>checked</i>)
939
940 <p>
941 Private slot handling the switching of the 'user-site' mode.
942 </p>
943 <dl>
944
945 <dt><i>checked</i> (bool)</dt>
946 <dd>
947 state of the 'user-site' check box
948 </dd>
949 </dl>
950 <a NAME="PipPackagesWidget.on_verboseCheckBox_clicked" ID="PipPackagesWidget.on_verboseCheckBox_clicked"></a>
951 <h4>PipPackagesWidget.on_verboseCheckBox_clicked</h4>
952 <b>on_verboseCheckBox_clicked</b>(<i>checked</i>)
953
954 <p>
955 Private slot to handle a change of the verbose package information
956 checkbox.
957 </p>
958 <dl>
959
960 <dt><i>checked</i> (bool)</dt>
961 <dd>
962 state of the checkbox
963 </dd>
964 </dl>
965 <div align="right"><a href="#top">Up</a></div>
966 <hr />
967 <hr />
968 <a NAME="PypiSearchResultsParser" ID="PypiSearchResultsParser"></a>
969 <h2>PypiSearchResultsParser</h2>
970
971 <p>
972 Class implementing the parser for the PyPI search result page.
973 </p>
974 <h3>Derived from</h3>
975 html.parser.HTMLParser
976 <h3>Class Attributes</h3>
977
978 <table>
979 <tr><td>ClassPrefix</td></tr>
980 </table>
981 <h3>Class Methods</h3>
982
983 <table>
984 <tr><td>None</td></tr>
985 </table>
986 <h3>Methods</h3>
987
988 <table>
989
990 <tr>
991 <td><a href="#PypiSearchResultsParser.__init__">PypiSearchResultsParser</a></td>
992 <td>Constructor</td>
993 </tr>
994 <tr>
995 <td><a href="#PypiSearchResultsParser.__getClass">__getClass</a></td>
996 <td>Private method to extract the class attribute out of the list of attributes.</td>
997 </tr>
998 <tr>
999 <td><a href="#PypiSearchResultsParser.__getDate">__getDate</a></td>
1000 <td>Private method to extract the datetime attribute out of the list of attributes and process it.</td>
1001 </tr>
1002 <tr>
1003 <td><a href="#PypiSearchResultsParser.getResults">getResults</a></td>
1004 <td>Public method to get the extracted search results.</td>
1005 </tr>
1006 <tr>
1007 <td><a href="#PypiSearchResultsParser.handle_data">handle_data</a></td>
1008 <td>Public method process arbitrary data.</td>
1009 </tr>
1010 <tr>
1011 <td><a href="#PypiSearchResultsParser.handle_endtag">handle_endtag</a></td>
1012 <td>Public method to process the end tag.</td>
1013 </tr>
1014 <tr>
1015 <td><a href="#PypiSearchResultsParser.handle_starttag">handle_starttag</a></td>
1016 <td>Public method to process the start tag.</td>
1017 </tr>
1018 </table>
1019 <h3>Static Methods</h3>
1020
1021 <table>
1022 <tr><td>None</td></tr>
1023 </table>
1024
1025 <a NAME="PypiSearchResultsParser.__init__" ID="PypiSearchResultsParser.__init__"></a>
1026 <h4>PypiSearchResultsParser (Constructor)</h4>
1027 <b>PypiSearchResultsParser</b>(<i>data</i>)
1028
1029 <p>
1030 Constructor
1031 </p>
1032 <dl>
1033
1034 <dt><i>data</i> (str)</dt>
1035 <dd>
1036 data to be parsed
1037 </dd>
1038 </dl>
1039 <a NAME="PypiSearchResultsParser.__getClass" ID="PypiSearchResultsParser.__getClass"></a>
1040 <h4>PypiSearchResultsParser.__getClass</h4>
1041 <b>__getClass</b>(<i>attrs</i>)
1042
1043 <p>
1044 Private method to extract the class attribute out of the list of
1045 attributes.
1046 </p>
1047 <dl>
1048
1049 <dt><i>attrs</i> (list of tuple of (str, str))</dt>
1050 <dd>
1051 list of tag attributes as (name, value) tuples
1052 </dd>
1053 </dl>
1054 <dl>
1055 <dt>Return:</dt>
1056 <dd>
1057 value of the 'class' attribute or None
1058 </dd>
1059 </dl>
1060 <dl>
1061 <dt>Return Type:</dt>
1062 <dd>
1063 str
1064 </dd>
1065 </dl>
1066 <a NAME="PypiSearchResultsParser.__getDate" ID="PypiSearchResultsParser.__getDate"></a>
1067 <h4>PypiSearchResultsParser.__getDate</h4>
1068 <b>__getDate</b>(<i>attrs</i>)
1069
1070 <p>
1071 Private method to extract the datetime attribute out of the list of
1072 attributes and process it.
1073 </p>
1074 <dl>
1075
1076 <dt><i>attrs</i> (list of tuple of (str, str))</dt>
1077 <dd>
1078 list of tag attributes as (name, value) tuples
1079 </dd>
1080 </dl>
1081 <dl>
1082 <dt>Return:</dt>
1083 <dd>
1084 value of the 'class' attribute or None
1085 </dd>
1086 </dl>
1087 <dl>
1088 <dt>Return Type:</dt>
1089 <dd>
1090 str
1091 </dd>
1092 </dl>
1093 <a NAME="PypiSearchResultsParser.getResults" ID="PypiSearchResultsParser.getResults"></a>
1094 <h4>PypiSearchResultsParser.getResults</h4>
1095 <b>getResults</b>(<i></i>)
1096
1097 <p>
1098 Public method to get the extracted search results.
1099 </p>
1100 <dl>
1101 <dt>Return:</dt>
1102 <dd>
1103 extracted result data
1104 </dd>
1105 </dl>
1106 <dl>
1107 <dt>Return Type:</dt>
1108 <dd>
1109 list of dict
1110 </dd>
1111 </dl>
1112 <a NAME="PypiSearchResultsParser.handle_data" ID="PypiSearchResultsParser.handle_data"></a>
1113 <h4>PypiSearchResultsParser.handle_data</h4>
1114 <b>handle_data</b>(<i>data</i>)
1115
1116 <p>
1117 Public method process arbitrary data.
1118 </p>
1119 <dl>
1120
1121 <dt><i>data</i> (str)</dt>
1122 <dd>
1123 data to be processed
1124 </dd>
1125 </dl>
1126 <a NAME="PypiSearchResultsParser.handle_endtag" ID="PypiSearchResultsParser.handle_endtag"></a>
1127 <h4>PypiSearchResultsParser.handle_endtag</h4>
1128 <b>handle_endtag</b>(<i>tag</i>)
1129
1130 <p>
1131 Public method to process the end tag.
1132 </p>
1133 <dl>
1134
1135 <dt><i>tag</i> (str)</dt>
1136 <dd>
1137 tag name (all lowercase)
1138 </dd>
1139 </dl>
1140 <a NAME="PypiSearchResultsParser.handle_starttag" ID="PypiSearchResultsParser.handle_starttag"></a>
1141 <h4>PypiSearchResultsParser.handle_starttag</h4>
1142 <b>handle_starttag</b>(<i>tag, attrs</i>)
1143
1144 <p>
1145 Public method to process the start tag.
1146 </p>
1147 <dl>
1148
1149 <dt><i>tag</i> (str)</dt>
1150 <dd>
1151 tag name (all lowercase)
1152 </dd>
1153 <dt><i>attrs</i> (list of tuple of (str, str))</dt>
1154 <dd>
1155 list of tag attributes as (name, value) tuples
1156 </dd>
1157 </dl>
1158 <div align="right"><a href="#top">Up</a></div>
1159 <hr />
1160 </body></html>

eric ide

mercurial