Hello,

Up. ;-)

Le 04/08/2013 04:10, Francois Lafont a écrit :

> Is it possible with argparse to have this syntax for a script?
> 
> my-script (-a -b VALUE-B | -c -d VALUE-D)
> 
> I would like to do this with the argparse module.
> 
> Thanks in advance.

I have found this post:
https://groups.google.com/forum/#!searchin/argparse-users/exclusive/argparse-users/-o6GOwhCjbQ/m-PfL4OxLAIJ

It was in 2011 and at that time, it was impossible to have the syntax above. I 
have the impression that it's impossible now yet. Am I wrong?

If it's impossible yet, I could try a hack. With some checks, I think I could 
have the "(-a -b VALUE-B | -c -d VALUE-D)" behavior but I would like this 
syntax appear in the help output too and I have no idea to do it.

-- 
François Lafont
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to