Can I add sections to optparse.OptionParser in python? -
i want add examples section after options when user calls prog -h
in python.
i have searched optparse.optionparser documents , internet in general , have found no help.
what copy-task-branch -h
outputs:
usage ===== copy-task-branch [options] source destination options ======= -h, --help show message , exit -f, --force force rewrite of existing branches. -r revision, --revision=revision use specific codeline revision (will not override using @ on source).
what want (or close):
usage ===== copy-task-branch [options] source destination options ======= -h, --help show message , exit -f, --force force rewrite of existing branches. -r revision, --revision=revision use specific codeline revision (will not override using @ on source). examples ======== copy-task-branch stable/next stable/topic1
is possible?
you passing epilog
parameter optionparser
class.
epilog : string paragraph of text print after option
Comments
Post a Comment