Hello,

I think that this isn't possible with optparse library.

However, it's possible with argparse (http://code.google.com/p/argparse/):
 http://argparse.googlecode.com/svn/trunk/doc/other-methods.html#sub-commands

It's not a standard library, but it's worth to take a look at it.

Best regards,
    Javier

2009/8/14 Steven Woody <narkewo...@gmail.com>:
> Hi,
> I am using OptionParser, but I've not managed figure out a way to support
> what I wanted command line format "prog <cmd> [options] [arguments]".
> E.g., "svn ls -r123 http://hello.world".   Can I do this using OptionParser?
> Thanks.
> --
> Life is the only flaw in an otherwise perfect nonexistence
>    -- Schopenhauer
>
> narke
> public key at http://subkeys.pgp.net:11371 (narkewo...@gmail.com)
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to