simple tool for checking if a python module is installed
Go to file
2021-06-17 22:38:10 -07:00
hasmodule initial commit 2021-06-17 22:38:10 -07:00
.gitignore Base python project 2021-05-19 17:25:23 -07:00
README.md initial commit 2021-06-17 22:38:10 -07:00
requirements.txt Base python project 2021-05-19 17:25:23 -07:00
setup.py initial commit 2021-06-17 22:38:10 -07:00

has-module

Simple tool for checking if a python module is installed.

has-module module_name [version]

  • If the python module named by $module_name is not installed, return exit code 1.
  • If $version is supplied and the installed module's version doesn't match it, return exit code 1.
  • Otherwise, the module was successfully imported and the exit code will be 0.