Ritesh Raj Sarraf wrote:
> Now if someone uses it as:
> ./foo --my-option a b c
> 
> I want somehow to store all the three arguments

Currently optparse doesn't support options with an arbitrary number of 
arguments.  I'm currently working on a optparse-inspired replacement 
which does support this along the lines of:

     parser.add_option('--my-option', nargs='*')

but it's not quite ready for prime-time yet.  I'm hoping to put an 
announcement out in the next couple of weeks.

STeVe
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to