An optparse question

dan.gass at gmail.com dan.gass at gmail.com
Fri Jul 21 17:42:43 EDT 2006


> Nope.  That only *nearly* does what T wants.  The usage message will
> still be printed immediately *after* the 'usage: ' string.
>
> >>> parser = OptionParser(usage=usage)
> >>> parser.print_help()
> usage: ************ THIS IS NEWLY INSERTED STRING************
> usage: lopts.py [options] input_file
>
> options:
>   -h, --help  show this help message and exit

Yes, I see what T meant now.  Behavior expectations (assumptions) has a
way of clouding one's vision.

Thanks




More information about the Python-list mailing list