if getattr(parser.values, option.dest):
    args.extend(getattr(parser.values, option.dest))
setattr(parser.values, option.dest, args)
parser = OptionParser()
parser.add_option('-q', '--quiet', action='store_false', dest='verbose',
    help="be vewwy quiet (I'm hunting wabbits)")
parser.add_option('-f', '--filename', action='callback', callback=cb, dest=
    'file')
options, args = parser.parse_args()
print(options.file)
print(args)
With Python's optparse module, how do you create an option that takes a variable number of arguments?