This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] xm create option parsing..

To: Mike Wray <mike.wray@xxxxxxxxxx>
Subject: Re: [Xen-devel] xm create option parsing..
From: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>
Date: Fri, 30 Jul 2004 10:59:13 +0100
Cc: Mike Wray <mike.wray@xxxxxxxxxxxxxxx>, Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>, Steven Hand <Steven.Hand@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxx, Ian.Pratt@xxxxxxxxxxxx
Delivery-date: Fri, 30 Jul 2004 10:59:14 +0100
Envelope-to: Steven.Hand@xxxxxxxxxxxx
In-reply-to: Your message of "Fri, 30 Jul 2004 10:16:14 BST." <410A11DE.6080809@xxxxxxxxxx>
> > 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...