is possible to make own help message or attach own event on help option using optparse module in Python?
Sure - just use the params to the OptionParser constructor:
import optparse
help_text = """
Hi, this is a really long help message for %prog.
It's a pretty ace thing. (C)2010 Stuff etc.
"""
parser = optparse.OptionParser(usage=help_text, version="%prog 1.0 beta")
(options, args) = parser.parse_args()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With