[IPython-dev] Unifying command-line conventions for 0.11+: single-dash OK?

Fernando Perez fperez.net at gmail.com
Fri Jan 8 18:42:11 EST 2010

Hi folks,

we currently have in our scripts a mix of -option and --option, and
we're thinking of unifying things as we move forward.  Now that we're
using argparse everywhere, it's very easy to choose what we like, and
my take on this is that the extra - at the beginning is just
unnecessary typing.  For old code that used getopt it was necessary,
because getopt interprets -xyz as -x -y -z, but we don't have that

So the question is: does anyone object to using

-option  (with -option-with-more-than-one-word for long ones)

as our spelling for all command-line flags?  This may require some
adjustment of aliases and scripts you may have, but it seems worth
cleaning up now as we do other adjustments for 0.11 an onwards.



ps - our recent work on this front actually resulted in a small argparse patch:


so I hope we'll be not only carrying fully updated argparse from
upstream, but that ultimately (when argparse makes it into python
itself) we'll be able to use the standard one without modifications,
as our fixes may well be there.

More information about the IPython-dev mailing list