| 1 |
HelpDev |
| 2 |
======= |
| 3 |
|
| 4 |
Helping users and developers to get information about the environment to |
| 5 |
report bugs or even test your system without spending a day on it. It can |
| 6 |
get information about hardware, OS, paths, Python distribution and packages, |
| 7 |
including Qt-things. Operates in Linux, Windows and Mac. Working on |
| 8 |
Python 2.7+ and Python 3.4+. |
| 9 |
|
| 10 |
If you want to get information at runtime of your application, you need |
| 11 |
to call using the same environment (and process) in which your application |
| 12 |
is running. This module can be imported and integrated into your application, |
| 13 |
providing a report about the current environment. |
| 14 |
|
| 15 |
Some information can be depedent or independent of your Python environment, |
| 16 |
and some others can be dependent your running application. So, there are some |
| 17 |
acronymn used to refer to them: |
| 18 |
|
| 19 |
- PEI: Python environment independent; |
| 20 |
|
| 21 |
- PED: Python environment DEPENDENT; |
| 22 |
|
| 23 |
- PEAD: Python environment and application DEPENDENT. |
| 24 |
|
| 25 |
|
| 26 |
**Caution:** |
| 27 |
|
| 28 |
- This script is not supposed to get personal information using the option |
| 29 |
``--all``, but you must check the information before using the output. |
| 30 |
|
| 31 |
- Using the option ``--all-for-sure`` it is added information about paths and |
| 32 |
variables that can show personal information. So, be sure when using this |
| 33 |
option when publishing in the web. |
| 34 |
|
| 35 |
- I'm not responsible for bad use or problems with the information given by |
| 36 |
this script, but if pointed in the Issues, I can help fixing it. |
| 37 |
|
| 38 |
|
| 39 |
Installing, updating and uninstalling |
| 40 |
##################################### |
| 41 |
|
| 42 |
|
| 43 |
To install and/or update, do :: |
| 44 |
|
| 45 |
$ pip install -U helpdev |
| 46 |
|
| 47 |
|
| 48 |
To remove :: |
| 49 |
|
| 50 |
$ pip uninstall helpdev |
| 51 |
|
| 52 |
|
| 53 |
Running |
| 54 |
####### |
| 55 |
|
| 56 |
|
| 57 |
You just need to run in the terminal the line(s) below. |
| 58 |
|
| 59 |
|
| 60 |
To get a minimalist output :: |
| 61 |
|
| 62 |
$ helpdev |
| 63 |
|
| 64 |
|
| 65 |
To filter a set of packages to get info, which lists all that starts with |
| 66 |
sphinx, qtpy and pyqt5 :: |
| 67 |
|
| 68 |
$ helpdev --packages="sphinx.*,qtpy,PYQT5" |
| 69 |
|
| 70 |
|
| 71 |
To get a complete output without personal information :: |
| 72 |
|
| 73 |
$ helpdev --all |
| 74 |
|
| 75 |
|
| 76 |
To get a complete output WITH PERSONAL INFORMATION :: |
| 77 |
|
| 78 |
$ helpdev --all-for-sure |
| 79 |
|
| 80 |
|
| 81 |
To get some help information :: |
| 82 |
|
| 83 |
$ helpdev --help |
| 84 |
|
| 85 |
|
| 86 |
Examples from v0.6 |
| 87 |
################## |
| 88 |
|
| 89 |
|
| 90 |
Help |
| 91 |
---- |
| 92 |
|
| 93 |
|
| 94 |
.. code-block:: console |
| 95 |
|
| 96 |
$ helpdev --help |
| 97 |
|
| 98 |
|
| 99 |
.. code-block:: console |
| 100 |
|
| 101 |
usage: helpdev |
| 102 |
[--hardware] [--os] [--thread] [--network [NETWORK]] |
| 103 |
[--distributions] [--python] [--conda] |
| 104 |
[--qt] [--qt-bindings] [--qt-abstractions] |
| 105 |
[--packages [PACKAGES]] |
| 106 |
[--packages-pip] [--packages-pip-e] |
| 107 |
[--packages-conda] [--packages-conda-e] |
| 108 |
[--numbers] [--float] [--int] |
| 109 |
[--personal] [--path] [--scope] |
| 110 |
[--all] |
| 111 |
[--all-for-sure] |
| 112 |
[--version] |
| 113 |
[--help] |
| 114 |
|
| 115 |
HelpDev - Extracts information about the Python environment easily. |
| 116 |
|
| 117 |
optional arguments: |
| 118 |
|
| 119 |
--hardware CPU, memory and architecture (PEI) |
| 120 |
--os Operating system (PEI) |
| 121 |
--thread Threads specification in the system (PEI) |
| 122 |
--network [NETWORK] Network information, DNS and load for usual sites |
| 123 |
(PEI). NETWORK timeout defaults to 5s. 0 is disabled |
| 124 |
|
| 125 |
--distributions All options for distributions below (PED) |
| 126 |
--python Python distribution (PED) |
| 127 |
--conda Conda/Anaconda Python distribution (PED) |
| 128 |
|
| 129 |
--qt All options for Qt below (PEAD) |
| 130 |
--qt-bindings Available Qt bindings (PyQt/Pyside) (PEAD) |
| 131 |
--qt-abstractions Available Qt abstractions (QtPy/Qt.Py/PyQtGraph) (PEAD) |
| 132 |
|
| 133 |
--packages [PACKAGES] All options for packages below, except '-e' (PED) |
| 134 |
Filter PACKAGE(s) to report. Accepts regex, separator is ',' |
| 135 |
--packages-pip PIP installed packages + PIP check (PED) |
| 136 |
--packages-pip-e PIP locally installed packages + PIP check (PED) |
| 137 |
--packages-conda CONDA installed packages (PED) |
| 138 |
--packages-conda-e CONDA locally installed packages (PED) |
| 139 |
|
| 140 |
--numbers All options for numbers below (PEI) |
| 141 |
--float Float representation in the system (PEI) |
| 142 |
--int Integer representation in the system (PEI) |
| 143 |
|
| 144 |
--personal All options for personal information below (PEAD) |
| 145 |
--path Show Python current paths i.e. 'sys.path' (PEAD) |
| 146 |
--scope Show Python current scope i.e. 'dir()' (PEAD) |
| 147 |
|
| 148 |
--all Run all options above, except 'personal' (PEAD) |
| 149 |
--all-for-sure Run all options above, INCLUDING 'PERSONAL' (PEAD) |
| 150 |
|
| 151 |
--version, -v Show program's version number and exit |
| 152 |
--help, -h Show this help message and exit |
| 153 |
|
| 154 |
|
| 155 |
With --packages filter |
| 156 |
---------------------- |
| 157 |
|
| 158 |
This filtering feature provides a clean list of packages to report. It |
| 159 |
accepts regular expressions. Each expression must be separated by comma. |
| 160 |
|
| 161 |
The basic regular expression checks the start until the end of the package |
| 162 |
name and they are case insenstitive. |
| 163 |
|
| 164 |
.. code-block:: sh |
| 165 |
|
| 166 |
# gets all that starts with 'sphinx', 'qtpy' and 'PYQT5' (not case sensitive) |
| 167 |
$ helpdev --packages="sphinx.*,qtpy,PYQT5" |
| 168 |
|
| 169 |
|
| 170 |
.. code-block:: sh |
| 171 |
|
| 172 |
* PYTHON PACKAGES--------------------------------------- |
| 173 |
- PyQt5......................... 5.12.1 |
| 174 |
- QtPy.......................... 1.7.0 |
| 175 |
- Sphinx........................ 2.0.1 |
| 176 |
- sphinx-rtd-theme.............. 0.4.3 |
| 177 |
- sphinxcontrib-applehelp....... 1.0.1 |
| 178 |
- sphinxcontrib-bibtex.......... 0.4.2 |
| 179 |
- sphinxcontrib-devhelp......... 1.0.1 |
| 180 |
- sphinxcontrib-excel........... 0.0.1 |
| 181 |
- sphinxcontrib-fulltoc......... 1.2.0 |
| 182 |
- sphinxcontrib-htmlhelp........ 1.0.2 |
| 183 |
- sphinxcontrib-jsmath.......... 1.0.1 |
| 184 |
- sphinxcontrib-plantuml........ 0.15 |
| 185 |
- sphinxcontrib-qthelp.......... 1.0.2 |
| 186 |
- sphinxcontrib-serializinghtml. 1.1.3 |
| 187 |
* CONDA PACKAGES----------------------------------------- |
| 188 |
- pyqt5......................... 5.12.1 |
| 189 |
- qtpy.......................... 1.7.0 |
| 190 |
- sphinx........................ 2.0.1 |
| 191 |
- sphinx-rtd-theme.............. 0.4.3 |
| 192 |
- sphinxcontrib-applehelp....... 1.0.1 |
| 193 |
- sphinxcontrib-bibtex.......... 0.4.2 |
| 194 |
- sphinxcontrib-devhelp......... 1.0.1 |
| 195 |
- sphinxcontrib-excel........... 0.0.1 |
| 196 |
- sphinxcontrib-fulltoc......... 1.2.0 |
| 197 |
- sphinxcontrib-htmlhelp........ 1.0.2 |
| 198 |
- sphinxcontrib-jsmath.......... 1.0.1 |
| 199 |
- sphinxcontrib-plantuml........ 0.15 |
| 200 |
- sphinxcontrib-qthelp.......... 1.0.2 |
| 201 |
- sphinxcontrib-serializinghtml. 1.1.3 |
| 202 |
|
| 203 |
|
| 204 |
This code is based on many other scripts from: |
| 205 |
|
| 206 |
- `zhreshold <https://gist.github.com/zhreshold/f4defab409cc0e6f6a0e75237f73ca99>`_ |
| 207 |
- `QDarkStyle <https://github.com/ColinDuquesnoy/QDarkStyleSheet>`_ |
| 208 |
- `QtPy <https://github.com/spyder-ide/qtpy>`_ |