helpdev-轻松提取有关python环境的信息。
helpdev的Python项目详细描述
帮助用户和开发人员获取有关环境的信息 报告错误,甚至不花一天时间就测试你的系统。它可以 获取有关硬件、操作系统、路径、python分发和包的信息, 包括qt的事情。在Linux、Windows和Mac上运行。正在处理 Python2.7+和Python3.4+。
如果要在应用程序运行时获取信息,则需要 使用应用程序所在的相同环境(和进程)调用 正在运行。此模块可以导入并集成到您的应用程序中, 提供有关当前环境的报告。
有些信息可以依赖于python环境,也可以独立于python环境, 还有一些可能依赖于正在运行的应用程序。所以,有一些 用于指代它们的缩写:
- pei:python环境无关;
- ped:python环境相关;
- pead:依赖于python环境和应用程序。
注意:
- 此脚本不应使用选项获取个人信息 --all,但在使用输出之前必须检查信息。
- 使用选项--all-for-sure可以添加有关路径和 可以显示个人信息的变量。所以,在使用这个的时候 在Web中发布时的选项。
- 我不负责使用不当或提供的信息有问题 这个脚本,但是如果指向问题,我可以帮助修复它。
安装、更新和卸载
要安装和/或更新,请执行
$ pip install -U helpdev
删除
$ pip uninstall helpdev
运行
你只需要在终端上运行下面的线路。
以获得最低限度的输出
$ helpdev
筛选一组包以获取信息,其中列出了以 狮身人面像、qtpy和pyqt5
$ helpdev --packages="sphinx.*,qtpy,PYQT5"
在没有个人信息的情况下获得完整的输出
$ helpdev --all
获得完整的个人信息输出
$ helpdev --all-for-sure
获取一些帮助信息
$ helpdev --help
v0.6中的示例
帮助
SomeRubycode.
$ helpdev --help
usage: helpdev
[--hardware] [--os] [--thread] [--network [NETWORK]]
[--distributions] [--python] [--conda]
[--qt] [--qt-bindings] [--qt-abstractions]
[--packages [PACKAGES]]
[--packages-pip] [--packages-pip-e]
[--packages-conda] [--packages-conda-e]
[--numbers] [--float] [--int]
[--personal] [--path] [--scope]
[--all]
[--all-for-sure]
[--version]
[--help]
HelpDev - Extracts information about the Python environment easily.
optional arguments:
--hardware CPU, memory and architecture (PEI)
--os Operating system (PEI)
--thread Threads specification in the system (PEI)
--network [NETWORK] Network information, DNS and load for usual sites
(PEI). NETWORK timeout defaults to 5s. 0 is disabled
--distributions All options for distributions below (PED)
--python Python distribution (PED)
--conda Conda/Anaconda Python distribution (PED)
--qt All options for Qt below (PEAD)
--qt-bindings Available Qt bindings (PyQt/Pyside) (PEAD)
--qt-abstractions Available Qt abstractions (QtPy/Qt.Py/PyQtGraph) (PEAD)
--packages [PACKAGES] All options for packages below, except '-e' (PED)
Filter PACKAGE(s) to report. Accepts regex, separator is ','
--packages-pip PIP installed packages + PIP check (PED)
--packages-pip-e PIP locally installed packages + PIP check (PED)
--packages-conda CONDA installed packages (PED)
--packages-conda-e CONDA locally installed packages (PED)
--numbers All options for numbers below (PEI)
--float Float representation in the system (PEI)
--int Integer representation in the system (PEI)
--personal All options for personal information below (PEAD)
--path Show Python current paths i.e. 'sys.path' (PEAD)
--scope Show Python current scope i.e. 'dir()' (PEAD)
--all Run all options above, except 'personal' (PEAD)
--all-for-sure Run all options above, INCLUDING 'PERSONAL' (PEAD)
--version, -v Show program's version number and exit
--help, -h Show this help message and exit
带–包过滤器
此筛选功能提供要报告的包的干净列表。它 接受正则表达式。每个表达式必须用逗号分隔。
基本正则表达式检查包的开始到结束 名称和它们是case institive。
# gets all that starts with 'sphinx', 'qtpy' and 'PYQT5' (not case sensitive) $ helpdev --packages="sphinx.*,qtpy,PYQT5"
* PYTHON PACKAGES--------------------------------------- - PyQt5......................... 5.12.1 - QtPy.......................... 1.7.0 - Sphinx........................ 2.0.1 - sphinx-rtd-theme.............. 0.4.3 - sphinxcontrib-applehelp....... 1.0.1 - sphinxcontrib-bibtex.......... 0.4.2 - sphinxcontrib-devhelp......... 1.0.1 - sphinxcontrib-excel........... 0.0.1 - sphinxcontrib-fulltoc......... 1.2.0 - sphinxcontrib-htmlhelp........ 1.0.2 - sphinxcontrib-jsmath.......... 1.0.1 - sphinxcontrib-plantuml........ 0.15 - sphinxcontrib-qthelp.......... 1.0.2 - sphinxcontrib-serializinghtml. 1.1.3 * CONDA PACKAGES----------------------------------------- - pyqt5......................... 5.12.1 - qtpy.......................... 1.7.0 - sphinx........................ 2.0.1 - sphinx-rtd-theme.............. 0.4.3 - sphinxcontrib-applehelp....... 1.0.1 - sphinxcontrib-bibtex.......... 0.4.2 - sphinxcontrib-devhelp......... 1.0.1 - sphinxcontrib-excel........... 0.0.1 - sphinxcontrib-fulltoc......... 1.2.0 - sphinxcontrib-htmlhelp........ 1.0.2 - sphinxcontrib-jsmath.......... 1.0.1 - sphinxcontrib-plantuml........ 0.15 - sphinxcontrib-qthelp.......... 1.0.2 - sphinxcontrib-serializinghtml. 1.1.3
此代码基于以下许多其他脚本: