Determine actually given command line arguments
Wayne Werner
wayne at waynewerner.com
Wed May 15 10:16:35 EDT 2013
On Wed, 15 May 2013, Henry Leyh wrote:
> Yes, I was trying that and it sort of works with strings if I use something
> sufficiently improbable like "__UNSELECTED__" as default. But it gets
> difficult with boolean or even number arguments where you just may not have
> valid "improbable" defaults. You could now say, so what, it's the default
> anyway. But in my program I would like to distinguish between given and not
> given arguments rather than between default and non-default.
Have you looked into docopt? It's pretty awesome, and might really help in
this case.
HTH,
-W
More information about the Python-list
mailing list