This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients atpage, bethard, martin.panter, paul.j3
Date 2016-01-28.00:19:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453940359.29.0.611086866885.issue26181@psf.upfronthosting.co.za>
In-reply-to
Content
There are 2 issues

parsing - how to reserve one or more arguments for use by following 'positionals'.  Fixes have been proposed in other bug/issues, but aren't trivial.

usage formatting - the stock formatter displays all optionals first, followed by all positionals.  In a multiline display positionals go on a new line.

Changes to the help formatter that would block this reordering have been discussed on Stackoverflow, but I don't recall such an issue here.  It can be done by changing one method in a subclassed formatter.

The immediate solution is to give your parser a custom usage line - one that puts the positional in the correct order.
History
Date User Action Args
2016-01-28 00:19:19paul.j3setrecipients: + paul.j3, bethard, martin.panter, atpage
2016-01-28 00:19:19paul.j3setmessageid: <1453940359.29.0.611086866885.issue26181@psf.upfronthosting.co.za>
2016-01-28 00:19:19paul.j3linkissue26181 messages
2016-01-28 00:19:19paul.j3create