
Currently The output of --help is in random order. The only way using public argparse api to control the order of display of --help is to add the arguments in the sorted order. So added a caching mechanism to collect all the calls to add_argument and ensure they are sorted before calling argparse's add_argument. The only other choice if anyone is interested is documented here which uses the non-public API http://stackoverflow.com/questions/12268602/sort-argparse-help-alphabetically Fixes LP# 1185959 Change-Id: I5f934c85fd516e2d87b3ece40142f16c898b04ce