def print_help(self, with_description=True): """Print description, usage and a detailed help message. @type with_description: bool @param with_description: if true, print module's __doc__ string """ if with_description: print() print(__doc__.strip()) print() if self.warning: print() for line in self.warning: sys.stderr.write(pp.warn(line)) print() print(mod_usage(mod_name=self.module_name, arg=self.arg_spec, optional=self.arg_option)) print() print(pp.command("options")) print(format_options( self.formatted_options )) if self.formatted_args: print() print(pp.command(self.arg_spec)) print(format_options(self.formatted_args)) print()