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

rail shafigulin rail.shafigulin at gmail.com
Tue Dec 18 21:39:17 CET 2012


On Tue, Dec 18, 2012 at 1:08 PM, Steve Willoughby <steve at alchemy.com> wrote:

> 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.
>

I currently have it done this way. It just seems a bit odd that I have to
arrange it manually.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20121218/599d78ad/attachment.html>


More information about the Tutor mailing list