already written optparse callback for range and list arguments?

Alex Gittens swiftset at gmail.com
Sat Jul 9 18:17:33 EDT 2005


I would like my program to accept a list of range values on the
command line, like
-a 1
-a 1-10
-a 4,5,2

In the interest of avoiding reinventing the wheel, is there already
available code for a callback that would enable optparse to parse
these as arguments?

Thanks,
Alex
-- 
ChapterZero: http://tangentspace.net/cz/



More information about the Python-list mailing list