8.1 Printing help

The print_help method can automatically generate help information for all the added options just like the optparse command line parser print_help method.

print_help( [file])
file is an optional keyword argument. If omitted, the generated help will be written to sys.stdout. Otherwise file is a expected to be a file object and the generated help will be written using the file object's write() method.