argument problem in optparse

Neal Becker ndbecker2 at gmail.com
Sat Mar 21 14:49:52 CET 2009


Qian Xu wrote:

> Hi All,
> 
> I have a problem with OptParse.
> I want to define such an arugument. It can accept additional value or no
> value.
> 
> "myscript.py --unittest File1,File2"
> "myscript.py --unittest"
> 
> Is it possible in OptParse? I have tried several combination. But ...
> 
> 
> Best regards
> --Qian Xu
> --
> http://mail.python.org/mailman/listinfo/python-list

Also check out argparse.





More information about the Python-list mailing list