Re: optik...what about subcommands, then? :) (fwd)

"leon j. breedt" <[email protected]> Tue, 6 May 2003 14:54:56 +1200
Newsgroups gmane.comp.python.optik.user
Message-ID <[email protected]>
On Sun, May 04, 2003 at 11:48:41PM -0400, David Goodger wrote:
> If you put the help option before the subcommand (e.g. "myapp --help 
> snapshot"), you'll get help on the main command (which should include a 
> list of possible subcommands as well as general options).  If you put 
> the help option after the subcommand (e.g. "myapp snapshot --help"), 
> you'll get help for the subcommand, which is what I'd expect.  Add a 
> line to each subcommand's help text saying "Use 'myapp --help' for 
> general options and a list of subcommands" and you're covered.  You 
> shouldn't want to get any more complicated than that.  If you do, write 
> a man page or proper docs; it's more than Optik/optparse is set up to 
> provide.
I got this going pretty much how I want it, thanks for the suggestions.

My only additional query is that it seems Optik doesn't use gettext for
strings like 'usage:'. How would one internationalize that? Option names
I obviously want to remain English, but the help text I may want to
localize.

-- 
in the beginning, was the code.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf