[Tutor] optparse.OptionParser options in alphabetical order in help display

Modulok modulok at gmail.com
Tue Dec 18 19:39:24 CET 2012


>> Does anybody know if there is a way to make --help option to display
>> options in alphabetical order?

I know this sounds like spam and doesn't answer your question, (sorry!) but you
should check out the third part module 'docopt'. It is *extremely* simple and a
lot more flexible. It made me actually want to write command line interfaces
again.


http://www.youtube.com/watch?v=pXhcPJK5cMc
http://docopt.org/

Again, sorry for the spam but everyone I've shown has switched and were glad
they did. It's also on PyPi and github. In fact, the github page is probably the
best place to check it out.

-Modulok-

On 12/18/12, rail shafigulin <rail.shafigulin at gmail.com> wrote:
> Does anybody know if there is a way to make --help option to display
> options in alphabetical order? Right now it displays options in the order I
> added them. I'm using Python 3.1
>
> Any help is appreciated.
> Thanks.
>


More information about the Tutor mailing list