title: With Python's optparse module, how do you create an option that takes a variable number of arguments?
body: <p>With Perl's <code>Getopt::Long</code> you can easily define command-line options that take a variable number of arguments:</p>
  
  <pre><code>foo.pl --files a.txt             --verbose
  foo.pl --files a.txt b.txt c.txt --verbose
  </code></pre>
  
  <p>Is there a way to do this directly with Python's <code>optparse</code> module? As far as I can tell, the <code>nargs</code> option attribute can be used to specify a fixed number of option arguments, and I have not seen other alternatives in the documentation.</p>