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

Steve Willoughby steve at alchemy.com
Tue Dec 18 19:08:06 CET 2012


Although it is probably too obvious to be the answer you're looking for, why can't you just add them in order in the source code?

This way, you can arrange them however you want them to appear, instead of python arbitrarily enforcing its own order. Python likes being explicit about things like that.

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.
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>To unsubscribe or change subscription options:
>http://mail.python.org/mailman/listinfo/tutor

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20121218/07bd6451/attachment.html>


More information about the Tutor mailing list