Message75469
| Author |
andybuckley |
| Recipients |
andybuckley |
| Date |
2008年11月03日.16:30:52 |
| SpamBayes Score |
2.0577336e-06 |
| Marked as misclassified |
No |
| Message-id |
<1225729854.98.0.852900527881.issue4256@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
optparse is a great option parser, but one thing that would make it even
greater would be if it provided a standard option (cf. --help) which
lists all the available options in a parseable form. Something prefixed
with --help, e.g. --help-options would be ideal since it doesn't clutter
the option namespace.
This would provide a simple command-line hook for e.g. bash completion
customisation with complete/compgen, which could then easily and
maintainably obtain the list of available switches via the
--help-options flag rather than hard-coding the option names or
attempting to grep the output of --help
It would also be good if the OptionParser provided a simple Python API
way to obtain the names of all option switches, rather than having to
loop over OptionGroups, calling the unadvertised 'option_list' and
'get_option_name' methods! |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2008年11月03日 16:30:55 | andybuckley | set | recipients:
+ andybuckley |
| 2008年11月03日 16:30:54 | andybuckley | set | messageid: <1225729854.98.0.852900527881.issue4256@psf.upfronthosting.co.za> |
| 2008年11月03日 16:30:54 | andybuckley | link | issue4256 messages |
| 2008年11月03日 16:30:53 | andybuckley | create |
|