$ ./sample.py
Use `sample.py help` for usage.
$ ./sample.py help
usage: sample.py <command> [options] [args]
Sample Program
Just a sample program
Available commands:
bye
hello
Use `sample.py help <command>` for help on a specific command.
See http://... for additional information.
$ ./sample.py help hello
hello: Print a greeting
usage: hello NAME
Options:
--shout Print the greeting in upper case
-e --exclamations ARG The number of exclamation marks used to end the greeting
$ ./sample.py hello
Hello!
$ ./sample.py hello --shout --exclamations 3
HELLO!!!