title: argparse module How to add option without any argument?
body: <p>I have created a script using <code>argparse</code>.</p>
  
  <p>The script needs to take a configuration file name as an option, and user can specify whether they need to proceed totally the script or only simulate it.</p>
  
  <p>The args to be passed: <code>./script -f config_file -s</code> or <code>./script -f config_file</code>.</p>
  
  <p>It's ok for the -f config_file part, but It keeps asking me for arguments for the -s which is optionnal and should not be followed by any.</p>
  
  <p>I have tried this:</p>
  
  <pre><code>parser = argparse.ArgumentParser()
  parser.add_argument('-f', '--file')
  #parser.add_argument('-s', '--simulate', nargs = '0')
  args = parser.parse_args()
  if args.file:
      config_file = args.file
  if args.set_in_prod:
          simulate = True
  else:
      pass
  </code></pre>
  
  <p>With the following errors:</p>
  
  <pre><code>File "/usr/local/lib/python2.6/dist-packages/argparse.py", line 2169, in _get_nargs_pattern
  nargs_pattern = '(-*%s-*)' % '-*'.join('A' * nargs)
  TypeError: can't multiply sequence by non-int of type 'str'
  </code></pre>
  
  <p>And same errror with <code>''</code> instead of <code>0</code>.</p>