[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-21 Thread Andy Buckley
Andy Buckley a...@insectnation.org added the comment: The backward compatible solution is to have --help-options disabled by default, and ask people to enable it with add_interface=True. Or to add the option just before arg parsing, if it has not already been defined? Thanks for the

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I prefer an approach that allows this option to be defined by default, since if it is not defined by default it defeats part of the purpose of having the option. The program author may not be concerned with completions (or even know

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Removing 2.7 since it is now in feature freeze. -- versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4256 ___

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-21 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: On Wed, Apr 21, 2010 at 12:36 AM, Andy Buckley rep...@bugs.python.org wrote: Or to add the option just before arg parsing, if it has not already been defined? Something like this was suggested before and it doesn't really work out

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-20 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: Thanks for the patch! One concern I have is that adding --help-options by default has the potential to break existing code, e.g. if someone using optparse or argparse was already defining their own --help-options flag. The backward

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-19 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Patch for optparse with tests. If it's ok, I'll sit down to argparse. -- keywords: +patch Added file: http://bugs.python.org/file16985/4256_1.patch ___ Python tracker rep...@bugs.python.org

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-19 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: Sorry, what does I'll sit down to mean? Does that mean you're offering to try to do the argparse patch too? Or that you'd rather someone else do it? (Either one's fine - I just couldn't tell which you meant.) --

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-19 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I guess I am using my English too little, that's why I am using polish expressions too often. What I meant was of course, that I will do argparse patch too. I haven't provided docs for --help-options yet, becuase it is not clear to me,

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-19 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Ok, here comes patch for argparse too. -- Added file: http://bugs.python.org/file16996/4256_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4256

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-05 Thread Andy Buckley
Andy Buckley a...@insectnation.org added the comment: Thanks for the pointers to both of these... I wasn't aware of either. I see argparse has been recently approved for Python stdlib inclusion, too: http://www.python.org/dev/peps/pep-0389/ Congratulations! As far as I can tell, genzshcomp is

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-03 Thread Andy Buckley
Andy Buckley a...@insectnation.org added the comment: That sort of idea, yes: just a wild thought, but it would be really nice if this was available so that in combination with a standard bash/zsh function, getting basic automatic command completion for scripts built with optparse (and any

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-03 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I'll take a look at optparse code and try to provide a patch. But first holidays must finish and I must come back to ma usual residence, where I have programming environment. -- ___ Python

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-03 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Please target argparse rather than optparse, or better yet in addition to optparse. And I'm +1 for making it easier to write completion scripts. -- nosy: +bethard, r.david.murray ___ Python

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-03 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: Someone pointed this out to me earlier: http://pypi.python.org/pypi/genzshcomp I believe it's trying to solve the same problem, and claims to work with both optparse and argparse, so it might be worth looking into what it's doing and

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-03-31 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Are you saying, that for example for this: grusz...@gruszczy-laptop:~/Programs/logbuilder$ ./logbuilder --help Usage: logbuilder [options] repo Options: --version show program's version number and exit -h, --help

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2009-05-16 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: -- keywords: +easy priority: - normal stage: - test needed versions: +Python 2.7, Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4256

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2008-11-03 Thread Andy Buckley
New submission from Andy Buckley [EMAIL PROTECTED]: 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.

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2008-11-03 Thread Winfried Plappert
Changes by Winfried Plappert [EMAIL PROTECTED]: -- nosy: +wplappert ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4256 ___ ___ Python-bugs-list mailing