167 <tr> |
167 <tr> |
168 <td><a href="#PipPackagesWidget.__repairPip">__repairPip</a></td> |
168 <td><a href="#PipPackagesWidget.__repairPip">__repairPip</a></td> |
169 <td>Private slot to repair the pip installation of the selected environment.</td> |
169 <td>Private slot to repair the pip installation of the selected environment.</td> |
170 </tr> |
170 </tr> |
171 <tr> |
171 <tr> |
172 <td><a href="#PipPackagesWidget.__score">__score</a></td> |
|
173 <td>Private method to calculate some score for a search result.</td> |
|
174 </tr> |
|
175 <tr> |
|
176 <td><a href="#PipPackagesWidget.__search">__search</a></td> |
172 <td><a href="#PipPackagesWidget.__search">__search</a></td> |
177 <td>Private method to perform the search.</td> |
173 <td>Private method to perform the search by calling the PyPI search URL.</td> |
178 </tr> |
174 </tr> |
179 <tr> |
175 <tr> |
180 <td><a href="#PipPackagesWidget.__searchError">__searchError</a></td> |
176 <td><a href="#PipPackagesWidget.__searchResponse">__searchResponse</a></td> |
181 <td>Private method handling a search error.</td> |
177 <td>Private method to extract the search result data from the response.</td> |
182 </tr> |
178 </tr> |
183 <tr> |
179 <tr> |
184 <td><a href="#PipPackagesWidget.__selectedUpdateableItems">__selectedUpdateableItems</a></td> |
180 <td><a href="#PipPackagesWidget.__selectedUpdateableItems">__selectedUpdateableItems</a></td> |
185 <td>Private method to get a list of selected items that can be updated.</td> |
181 <td>Private method to get a list of selected items that can be updated.</td> |
186 </tr> |
182 </tr> |
264 <td><a href="#PipPackagesWidget.on_searchEditName_returnPressed">on_searchEditName_returnPressed</a></td> |
256 <td><a href="#PipPackagesWidget.on_searchEditName_returnPressed">on_searchEditName_returnPressed</a></td> |
265 <td>Private slot initiating a search via a press of the Return key.</td> |
257 <td>Private slot initiating a search via a press of the Return key.</td> |
266 </tr> |
258 </tr> |
267 <tr> |
259 <tr> |
268 <td><a href="#PipPackagesWidget.on_searchEditName_textChanged">on_searchEditName_textChanged</a></td> |
260 <td><a href="#PipPackagesWidget.on_searchEditName_textChanged">on_searchEditName_textChanged</a></td> |
269 <td>Private slot handling a change of the search term.</td> |
|
270 </tr> |
|
271 <tr> |
|
272 <td><a href="#PipPackagesWidget.on_searchEditSummary_returnPressed">on_searchEditSummary_returnPressed</a></td> |
|
273 <td>Private slot initiating a search via a press of the Return key.</td> |
|
274 </tr> |
|
275 <tr> |
|
276 <td><a href="#PipPackagesWidget.on_searchEditSummary_textChanged">on_searchEditSummary_textChanged</a></td> |
|
277 <td>Private slot handling a change of the search term.</td> |
261 <td>Private slot handling a change of the search term.</td> |
278 </tr> |
262 </tr> |
279 <tr> |
263 <tr> |
280 <td><a href="#PipPackagesWidget.on_searchResultList_itemActivated">on_searchResultList_itemActivated</a></td> |
264 <td><a href="#PipPackagesWidget.on_searchResultList_itemActivated">on_searchResultList_itemActivated</a></td> |
281 <td>Private slot reacting on an search result item activation.</td> |
265 <td>Private slot reacting on an search result item activation.</td> |
545 <b>__populateEnvironments</b>(<i></i>) |
529 <b>__populateEnvironments</b>(<i></i>) |
546 |
530 |
547 <p> |
531 <p> |
548 Private method to get a list of environments and populate the selector. |
532 Private method to get a list of environments and populate the selector. |
549 </p> |
533 </p> |
550 <a NAME="PipPackagesWidget.__processSearchResult" ID="PipPackagesWidget.__processSearchResult"></a> |
|
551 <h4>PipPackagesWidget.__processSearchResult</h4> |
|
552 <b>__processSearchResult</b>(<i>data</i>) |
|
553 |
|
554 <p> |
|
555 Private method to process the search result data from PyPI. |
|
556 </p> |
|
557 <dl> |
|
558 |
|
559 <dt><i>data</i> (tuple)</dt> |
|
560 <dd> |
|
561 result data with hits in the first element |
|
562 </dd> |
|
563 </dl> |
|
564 <a NAME="PipPackagesWidget.__purgeCache" ID="PipPackagesWidget.__purgeCache"></a> |
534 <a NAME="PipPackagesWidget.__purgeCache" ID="PipPackagesWidget.__purgeCache"></a> |
565 <h4>PipPackagesWidget.__purgeCache</h4> |
535 <h4>PipPackagesWidget.__purgeCache</h4> |
566 <b>__purgeCache</b>(<i></i>) |
536 <b>__purgeCache</b>(<i></i>) |
567 |
537 |
568 <p> |
538 <p> |
588 |
558 |
589 <p> |
559 <p> |
590 Private slot to repair the pip installation of the selected |
560 Private slot to repair the pip installation of the selected |
591 environment. |
561 environment. |
592 </p> |
562 </p> |
593 <a NAME="PipPackagesWidget.__score" ID="PipPackagesWidget.__score"></a> |
|
594 <h4>PipPackagesWidget.__score</h4> |
|
595 <b>__score</b>(<i>name, summary</i>) |
|
596 |
|
597 <p> |
|
598 Private method to calculate some score for a search result. |
|
599 </p> |
|
600 <dl> |
|
601 |
|
602 <dt><i>name</i> (str)</dt> |
|
603 <dd> |
|
604 name of the returned package |
|
605 </dd> |
|
606 <dt><i>summary</i> (str)</dt> |
|
607 <dd> |
|
608 summary text for the package |
|
609 </dd> |
|
610 </dl> |
|
611 <dl> |
|
612 <dt>Return:</dt> |
|
613 <dd> |
|
614 score value |
|
615 </dd> |
|
616 </dl> |
|
617 <dl> |
|
618 <dt>Return Type:</dt> |
|
619 <dd> |
|
620 int |
|
621 </dd> |
|
622 </dl> |
|
623 <a NAME="PipPackagesWidget.__search" ID="PipPackagesWidget.__search"></a> |
563 <a NAME="PipPackagesWidget.__search" ID="PipPackagesWidget.__search"></a> |
624 <h4>PipPackagesWidget.__search</h4> |
564 <h4>PipPackagesWidget.__search</h4> |
625 <b>__search</b>(<i></i>) |
565 <b>__search</b>(<i></i>) |
626 |
566 |
627 <p> |
567 <p> |
628 Private method to perform the search. |
568 Private method to perform the search by calling the PyPI search URL. |
629 </p> |
569 </p> |
630 <a NAME="PipPackagesWidget.__searchError" ID="PipPackagesWidget.__searchError"></a> |
570 <a NAME="PipPackagesWidget.__searchResponse" ID="PipPackagesWidget.__searchResponse"></a> |
631 <h4>PipPackagesWidget.__searchError</h4> |
571 <h4>PipPackagesWidget.__searchResponse</h4> |
632 <b>__searchError</b>(<i>errorCode, errorString</i>) |
572 <b>__searchResponse</b>(<i>reply</i>) |
633 |
573 |
634 <p> |
574 <p> |
635 Private method handling a search error. |
575 Private method to extract the search result data from the response. |
636 </p> |
576 </p> |
637 <dl> |
577 <dl> |
638 |
578 |
639 <dt><i>errorCode</i> (int)</dt> |
579 <dt><i>reply</i> (QNetworkReply)</dt> |
640 <dd> |
580 <dd> |
641 code of the error |
581 reference to the reply object containing the data |
642 </dd> |
|
643 <dt><i>errorString</i> (str)</dt> |
|
644 <dd> |
|
645 error message |
|
646 </dd> |
582 </dd> |
647 </dl> |
583 </dl> |
648 <a NAME="PipPackagesWidget.__selectedUpdateableItems" ID="PipPackagesWidget.__selectedUpdateableItems"></a> |
584 <a NAME="PipPackagesWidget.__selectedUpdateableItems" ID="PipPackagesWidget.__selectedUpdateableItems"></a> |
649 <h4>PipPackagesWidget.__selectedUpdateableItems</h4> |
585 <h4>PipPackagesWidget.__selectedUpdateableItems</h4> |
650 <b>__selectedUpdateableItems</b>(<i></i>) |
586 <b>__selectedUpdateableItems</b>(<i></i>) |
708 <dt><i>item</i> (QTreeWidgetItem)</dt> |
644 <dt><i>item</i> (QTreeWidgetItem)</dt> |
709 <dd> |
645 <dd> |
710 reference to the search result item to show details for |
646 reference to the search result item to show details for |
711 </dd> |
647 </dd> |
712 </dl> |
648 </dl> |
713 <a NAME="PipPackagesWidget.__transformHits" ID="PipPackagesWidget.__transformHits"></a> |
|
714 <h4>PipPackagesWidget.__transformHits</h4> |
|
715 <b>__transformHits</b>(<i>hits</i>) |
|
716 |
|
717 <p> |
|
718 Private method to convert the list returned from pypi into a |
|
719 packages list. |
|
720 </p> |
|
721 <dl> |
|
722 |
|
723 <dt><i>hits</i> (list of dict)</dt> |
|
724 <dd> |
|
725 list returned from pypi |
|
726 </dd> |
|
727 </dl> |
|
728 <dl> |
|
729 <dt>Return:</dt> |
|
730 <dd> |
|
731 list of packages |
|
732 </dd> |
|
733 </dl> |
|
734 <dl> |
|
735 <dt>Return Type:</dt> |
|
736 <dd> |
|
737 list of dict |
|
738 </dd> |
|
739 </dl> |
|
740 <a NAME="PipPackagesWidget.__uninstallRequirements" ID="PipPackagesWidget.__uninstallRequirements"></a> |
649 <a NAME="PipPackagesWidget.__uninstallRequirements" ID="PipPackagesWidget.__uninstallRequirements"></a> |
741 <h4>PipPackagesWidget.__uninstallRequirements</h4> |
650 <h4>PipPackagesWidget.__uninstallRequirements</h4> |
742 <b>__uninstallRequirements</b>(<i></i>) |
651 <b>__uninstallRequirements</b>(<i></i>) |
743 |
652 |
744 <p> |
653 <p> |
894 <dt><i>txt</i> (str)</dt> |
803 <dt><i>txt</i> (str)</dt> |
895 <dd> |
804 <dd> |
896 search term |
805 search term |
897 </dd> |
806 </dd> |
898 </dl> |
807 </dl> |
899 <a NAME="PipPackagesWidget.on_searchEditSummary_returnPressed" ID="PipPackagesWidget.on_searchEditSummary_returnPressed"></a> |
|
900 <h4>PipPackagesWidget.on_searchEditSummary_returnPressed</h4> |
|
901 <b>on_searchEditSummary_returnPressed</b>(<i></i>) |
|
902 |
|
903 <p> |
|
904 Private slot initiating a search via a press of the Return key. |
|
905 </p> |
|
906 <a NAME="PipPackagesWidget.on_searchEditSummary_textChanged" ID="PipPackagesWidget.on_searchEditSummary_textChanged"></a> |
|
907 <h4>PipPackagesWidget.on_searchEditSummary_textChanged</h4> |
|
908 <b>on_searchEditSummary_textChanged</b>(<i>txt</i>) |
|
909 |
|
910 <p> |
|
911 Private slot handling a change of the search term. |
|
912 </p> |
|
913 <dl> |
|
914 |
|
915 <dt><i>txt</i> (str)</dt> |
|
916 <dd> |
|
917 search term |
|
918 </dd> |
|
919 </dl> |
|
920 <a NAME="PipPackagesWidget.on_searchResultList_itemActivated" ID="PipPackagesWidget.on_searchResultList_itemActivated"></a> |
808 <a NAME="PipPackagesWidget.on_searchResultList_itemActivated" ID="PipPackagesWidget.on_searchResultList_itemActivated"></a> |
921 <h4>PipPackagesWidget.on_searchResultList_itemActivated</h4> |
809 <h4>PipPackagesWidget.on_searchResultList_itemActivated</h4> |
922 <b>on_searchResultList_itemActivated</b>(<i>item, column</i>) |
810 <b>on_searchResultList_itemActivated</b>(<i>item, column</i>) |
923 |
811 |
924 <p> |
812 <p> |
1020 state of the checkbox |
908 state of the checkbox |
1021 </dd> |
909 </dd> |
1022 </dl> |
910 </dl> |
1023 <div align="right"><a href="#top">Up</a></div> |
911 <div align="right"><a href="#top">Up</a></div> |
1024 <hr /> |
912 <hr /> |
|
913 <hr /> |
|
914 <a NAME="PypiSearchResultsParser" ID="PypiSearchResultsParser"></a> |
|
915 <h2>PypiSearchResultsParser</h2> |
|
916 |
|
917 <p> |
|
918 Class implementing the parser for the PyPI search result page. |
|
919 </p> |
|
920 <h3>Derived from</h3> |
|
921 html.parser.HTMLParser |
|
922 <h3>Class Attributes</h3> |
|
923 |
|
924 <table> |
|
925 <tr><td>ClassPrefix</td></tr> |
|
926 </table> |
|
927 <h3>Class Methods</h3> |
|
928 |
|
929 <table> |
|
930 <tr><td>None</td></tr> |
|
931 </table> |
|
932 <h3>Methods</h3> |
|
933 |
|
934 <table> |
|
935 |
|
936 <tr> |
|
937 <td><a href="#PypiSearchResultsParser.__init__">PypiSearchResultsParser</a></td> |
|
938 <td>Constructor</td> |
|
939 </tr> |
|
940 <tr> |
|
941 <td><a href="#PypiSearchResultsParser.__getClass">__getClass</a></td> |
|
942 <td>Private method to extract the class attribute out of the list of attributes.</td> |
|
943 </tr> |
|
944 <tr> |
|
945 <td><a href="#PypiSearchResultsParser.__getDate">__getDate</a></td> |
|
946 <td>Private method to extract the datetime attribute out of the list of attributes and process it.</td> |
|
947 </tr> |
|
948 <tr> |
|
949 <td><a href="#PypiSearchResultsParser.getResults">getResults</a></td> |
|
950 <td>Public method to get the extracted search results.</td> |
|
951 </tr> |
|
952 <tr> |
|
953 <td><a href="#PypiSearchResultsParser.handle_data">handle_data</a></td> |
|
954 <td>Public method process arbitrary data.</td> |
|
955 </tr> |
|
956 <tr> |
|
957 <td><a href="#PypiSearchResultsParser.handle_endtag">handle_endtag</a></td> |
|
958 <td>Public method to process the end tag.</td> |
|
959 </tr> |
|
960 <tr> |
|
961 <td><a href="#PypiSearchResultsParser.handle_starttag">handle_starttag</a></td> |
|
962 <td>Public method to process the start tag.</td> |
|
963 </tr> |
|
964 </table> |
|
965 <h3>Static Methods</h3> |
|
966 |
|
967 <table> |
|
968 <tr><td>None</td></tr> |
|
969 </table> |
|
970 |
|
971 <a NAME="PypiSearchResultsParser.__init__" ID="PypiSearchResultsParser.__init__"></a> |
|
972 <h4>PypiSearchResultsParser (Constructor)</h4> |
|
973 <b>PypiSearchResultsParser</b>(<i>data</i>) |
|
974 |
|
975 <p> |
|
976 Constructor |
|
977 </p> |
|
978 <dl> |
|
979 |
|
980 <dt><i>data</i> (str)</dt> |
|
981 <dd> |
|
982 data to be parsed |
|
983 </dd> |
|
984 </dl> |
|
985 <a NAME="PypiSearchResultsParser.__getClass" ID="PypiSearchResultsParser.__getClass"></a> |
|
986 <h4>PypiSearchResultsParser.__getClass</h4> |
|
987 <b>__getClass</b>(<i>attrs</i>) |
|
988 |
|
989 <p> |
|
990 Private method to extract the class attribute out of the list of |
|
991 attributes. |
|
992 </p> |
|
993 <dl> |
|
994 |
|
995 <dt><i>attrs</i> (list of tuple of (str, str))</dt> |
|
996 <dd> |
|
997 list of tag attributes as (name, value) tuples |
|
998 </dd> |
|
999 </dl> |
|
1000 <dl> |
|
1001 <dt>Return:</dt> |
|
1002 <dd> |
|
1003 value of the 'class' attribute or None |
|
1004 </dd> |
|
1005 </dl> |
|
1006 <dl> |
|
1007 <dt>Return Type:</dt> |
|
1008 <dd> |
|
1009 str |
|
1010 </dd> |
|
1011 </dl> |
|
1012 <a NAME="PypiSearchResultsParser.__getDate" ID="PypiSearchResultsParser.__getDate"></a> |
|
1013 <h4>PypiSearchResultsParser.__getDate</h4> |
|
1014 <b>__getDate</b>(<i>attrs</i>) |
|
1015 |
|
1016 <p> |
|
1017 Private method to extract the datetime attribute out of the list of |
|
1018 attributes and process it. |
|
1019 </p> |
|
1020 <dl> |
|
1021 |
|
1022 <dt><i>attrs</i> (list of tuple of (str, str))</dt> |
|
1023 <dd> |
|
1024 list of tag attributes as (name, value) tuples |
|
1025 </dd> |
|
1026 </dl> |
|
1027 <dl> |
|
1028 <dt>Return:</dt> |
|
1029 <dd> |
|
1030 value of the 'class' attribute or None |
|
1031 </dd> |
|
1032 </dl> |
|
1033 <dl> |
|
1034 <dt>Return Type:</dt> |
|
1035 <dd> |
|
1036 str |
|
1037 </dd> |
|
1038 </dl> |
|
1039 <a NAME="PypiSearchResultsParser.getResults" ID="PypiSearchResultsParser.getResults"></a> |
|
1040 <h4>PypiSearchResultsParser.getResults</h4> |
|
1041 <b>getResults</b>(<i></i>) |
|
1042 |
|
1043 <p> |
|
1044 Public method to get the extracted search results. |
|
1045 </p> |
|
1046 <dl> |
|
1047 <dt>Return:</dt> |
|
1048 <dd> |
|
1049 extracted result data |
|
1050 </dd> |
|
1051 </dl> |
|
1052 <dl> |
|
1053 <dt>Return Type:</dt> |
|
1054 <dd> |
|
1055 list of dict |
|
1056 </dd> |
|
1057 </dl> |
|
1058 <a NAME="PypiSearchResultsParser.handle_data" ID="PypiSearchResultsParser.handle_data"></a> |
|
1059 <h4>PypiSearchResultsParser.handle_data</h4> |
|
1060 <b>handle_data</b>(<i>data</i>) |
|
1061 |
|
1062 <p> |
|
1063 Public method process arbitrary data. |
|
1064 </p> |
|
1065 <dl> |
|
1066 |
|
1067 <dt><i>data</i> (str)</dt> |
|
1068 <dd> |
|
1069 data to be processed |
|
1070 </dd> |
|
1071 </dl> |
|
1072 <a NAME="PypiSearchResultsParser.handle_endtag" ID="PypiSearchResultsParser.handle_endtag"></a> |
|
1073 <h4>PypiSearchResultsParser.handle_endtag</h4> |
|
1074 <b>handle_endtag</b>(<i>tag</i>) |
|
1075 |
|
1076 <p> |
|
1077 Public method to process the end tag. |
|
1078 </p> |
|
1079 <dl> |
|
1080 |
|
1081 <dt><i>tag</i> (str)</dt> |
|
1082 <dd> |
|
1083 tag name (all lowercase) |
|
1084 </dd> |
|
1085 </dl> |
|
1086 <a NAME="PypiSearchResultsParser.handle_starttag" ID="PypiSearchResultsParser.handle_starttag"></a> |
|
1087 <h4>PypiSearchResultsParser.handle_starttag</h4> |
|
1088 <b>handle_starttag</b>(<i>tag, attrs</i>) |
|
1089 |
|
1090 <p> |
|
1091 Public method to process the start tag. |
|
1092 </p> |
|
1093 <dl> |
|
1094 |
|
1095 <dt><i>tag</i> (str)</dt> |
|
1096 <dd> |
|
1097 tag name (all lowercase) |
|
1098 </dd> |
|
1099 <dt><i>attrs</i> (list of tuple of (str, str))</dt> |
|
1100 <dd> |
|
1101 list of tag attributes as (name, value) tuples |
|
1102 </dd> |
|
1103 </dl> |
|
1104 <div align="right"><a href="#top">Up</a></div> |
|
1105 <hr /> |
1025 </body></html> |
1106 </body></html> |