On 11/12/2013 20:03, Chris Angelico wrote:
On Thu, Dec 12, 2013 at 7:00 AM, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
I use the alternative X for a mandatory argument X.
Also common, but how do you specify a keyword, then? Say you have a
command with subcommands:
$0 foo x y
Move the foo to (x,y)
$0 bar x y z
Go to bar X, order a Y, and Z it [eg 'compress', 'gzip', 'drink']
How do you show that x/y/z are mandatory args, but foo/bar are
keywords to be typed exactly? In some formats italicized text can make
that distinction, but not in pure text.
ChrisA
Haven't a clue off the top of my head so read all about it here
https://github.com/docopt/docopt
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list