Re: nested subparsers with argparse

2010-08-23 Thread Peter Otten
Chris Withers wrote: > I'm looking to build a script that has command line options as follows: > > ./myscript.py command subcommand [options] > > I can do up to the command [options] bit with add_subparsers in > argparse, but how do I then add a second level of subparsers? It looks like subpars

Re: nested subparsers with argparse

2010-08-23 Thread Chris Withers
Chris Withers wrote: Hi All, I'm looking to build a script that has command line options as follows: ./myscript.py command subcommand [options] I can do up to the command [options] bit with add_subparsers in argparse, but how do I then add a second level of subparsers? Answering my own ques

nested subparsers with argparse

2010-08-23 Thread Chris Withers
Hi All, I'm looking to build a script that has command line options as follows: ./myscript.py command subcommand [options] I can do up to the command [options] bit with add_subparsers in argparse, but how do I then add a second level of subparsers? cheers, Chris -- http://mail.python.org/m