title: Specifying default filenames with argparse, but not opening them on --help?
body: <p>Let's say I have a script that does some work on a file. It takes this file's name on the command line, but if it's not provided, it defaults to a known filename (<code>content.txt</code>, say). With python's <code>argparse</code>, I use the following:</p>
  
  <pre><code>parser = argparse.ArgumentParser(description='my illustrative example')
  parser.add_argument('--content', metavar='file', 
                       default='content.txt', type=argparse.FileType('r'),
                       help='file to process (defaults to content.txt)')
  args = parser.parse_args()
  # do some work on args.content, which is a file-like object
  </code></pre>
  
  <p>This works great. The only problem is that if I run <code>python myscript --help</code>, I get an <code>ArgumentError</code> if the file isn't there (which I guess makes sense), and the help text is not shown. I'd rather it not try to open the file if the user just wants <code>--help</code>. Is there any way to do this? I know I could make the argument a string and take care of opening the file myself later (and I've been doing that), but it would be convenient to have <code>argparse</code> take care of it.</p>