Reference

HelpDev - Extracts information about the Python environment easily.

Authors:
Since:

2019/04/16

License:

MIT

helpdev.QT_ABSTRACTIONS = ['qtpy', 'pyqtgraph', 'Qt']

values of all Qt abstraction layers to import.

Type

list

helpdev.QT_BINDINGS = ['PyQt4', 'PyQt5', 'PySide', 'PySide2']

values of all Qt bindings to import.

Type

list

helpdev.check_conda()

Check Conda Python distribution information.

It is Python/Conda environment dependent.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.check_conda_packages(edit_mode=False, packages=None)

Check conda inslalled packages information filtering for packages.

It is Python/Conda environment dependent.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.check_float()

Check float limits information.

Get information from sys library.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.check_hardware()

Check hardware information.

It uses subprocess commands for each system along with psutil library. So you need to install psutil library.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.check_installed(import_list)

Return a list of installed packages from import_list.

Parameters

import_list (list(str)) – List of of import names to check installation.

Returns

Filtered list of installed packages.

Return type

list(str)

helpdev.check_int()

Check int limits information.

Get information from sys library.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.check_network(timeout)

Check network connection for URLS list with timeout.

Parameters

timeout (int) – timout in seconds.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.check_os()

Check operating system information.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.check_path()

Check Python path from sys library.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.check_python()

Check Python information.

It is Python environment dependent. Get information from platform and sys libraries.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.check_python_packages(edit_mode=False, packages=None)

Check PIP installed packages filtering for packages.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.check_qt()

Check Qt related bindings and abstractions.

helpdev.check_qt_abstractions()

Check all Qt abstractions related information.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.check_qt_bindings()

Check all Qt bindings related information.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.check_scope()

Check Python scope or dir().

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.check_thread()

Check threads information.

Get information from sys library.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.installed_qt_abstractions()

Return a list of qt abstraction layers available.

Returns

Dictionary filled with respective information.

Return type

dict(str)

helpdev.installed_qt_bindings()

Return a list of qt bindings available.

Returns

List filled with respective information.

Return type

list(str)

helpdev.print_output(info_dict)

Print output in a nested list format.

helpdev.qt_abstraction_information(import_name)

Get abstraction layer version and binding (default or current if in use).

Note

  • The name of the installed package can differ from the import name. This is an weird thing from PIP/CONDA, e.g, the abstraction ‘qt.py’ is imported as ‘Qt’.

  • Since each package is build as it is, sometimes we are not able to define its information, e.g, Qt.py is installed but no binding is. This will cause an error that, for now, it is impossible to us to show any other information about it, e.g, version. We need to deal with a better way.

  • This function should be called with pre-defined list of installed packages passed throuw import_name, do not use it to try import.

Parameters

import_name (str) – Import name of abstraction for Qt.

Raises

ImportError – When the import is not found.

Returns

(abstraction version,

environment variable, binding variable, import name, status)

Return type

tuple

helpdev.qt_binding_information(import_name)

Get binding information of version and Qt version.

Note

The name of the installed package can differ from the import name. This is an weird thing from PIP/CONDA, e.g, the binding ‘pyqt5’ in PIP is ‘pyqt’ in Conda and both are imported as ‘PyQt5’.

Parameters

import_name (str) – Import name of binding for Qt.

Raises

ImportError – When the import is not found.

Returns

(binding version,

qt version)

Return type

tuple