title: Python Argparse subparsers
body: <p>I am using the Argparse Module to parse command line options. I have a main script which calls either subscript A or subscript B. I now have a a subparser instance for A and B and the main parser instance which should contain info about variables that A and B need. Something like:</p>
  
  <pre><code>def __init__(self):
      parser = argparse.ArgumentParser("Parser")
      parser.addArgument('--input') #this should be availabe for A and B
  
      subparsers = parser.add_subparsers('Description')
      A_parser = subparsers.add_parser(A)
      A_paser.add_argument('--a_option')
  
      B_parser = parser.add_subparser('Description')
      B_parser.add_arguemnt('--b_option')
  
      args = parser.parse_args()
  </code></pre>
  
  <p>But if I use it like this, I can only change args.options via the --input option if I do not specify A or B on program call. Execution of </p>
  
  <pre><code>program.py A --input ./
  </code></pre>
  
  <p>or</p>
  
  <pre><code>program.py --input ./ A
  </code></pre>
  
  <p>both fail.</p>