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

2012-12-18 Thread rail shafigulin
On Tue, Dec 18, 2012 at 8:13 PM, Steven D'Aprano wrote: > On 19/12/12 07:39, rail shafigulin wrote: > > I currently have it done this way. It just seems a bit odd that I have to >> arrange it manually. >> > > What's so special about alphabetical order? Wouldn't it make more sense for > related op

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

2012-12-18 Thread Steven D'Aprano
On 19/12/12 07:39, rail shafigulin wrote: I currently have it done this way. It just seems a bit odd that I have to arrange it manually. What's so special about alphabetical order? Wouldn't it make more sense for related options to be kept together? E.g.: Usage: make_sandwich [OPTIONS] --

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

2012-12-18 Thread rail shafigulin
On Tue, Dec 18, 2012 at 1:08 PM, Steve Willoughby 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 enforc

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

2012-12-18 Thread rail shafigulin
On Tue, Dec 18, 2012 at 1:39 PM, Modulok wrote: > >> 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

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

2012-12-18 Thread Modulok
>> 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 ac

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

2012-12-18 Thread Steve Willoughby
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