|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] xm create option parsing..
Ian Pratt wrote:
Each subcommand is responsible for parsing its own options, so
we could get 'xm create' etc. to allow options after the args.
I'll make the change.
Oops. The gnu-style getopt parsing is a Python 2.3 feature - not
available in 2.2. So we can't enable it at the moment.
That's a bind. I'm going to have to cave in and switch to 2.3 at
some point, but I'd like to hold out for a while longer.
'create' is the only sub command that really suffers from this,
so could we just temporally hack the parsing to call getopt again
on the arguments[1:] and append to the list? Not pretty, but...
It's worse than that - because getopt bails on the first non-option
we have to keep on calling it iteratively. Might as well write
your own getopt :-). The way out is to go with 2.3 and use gnu_getopt
or do some backport hack for the code for 2.3 to 2.2.
In the meantime just document that the format is
command [options] [args]
Mike
|
|
|
|
|