Created
May 22, 2018 11:43
-
-
Save norpol/24fa952a043b287d4f0e424b8b0017cc to your computer and use it in GitHub Desktop.
Easy snippet to print a python help-page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "${1:-}" ]; then | |
cat <<EOF | |
Launches Python help page of a given module | |
Usage: <pyhelp> <modulename> | |
EOF | |
exit | |
fi | |
python -c "import $1; help($1)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment