title: python argparse subcommand with dependency and conflict
body: <p>I want to use argparse to build a tool with subcommand. The possible syntax could be</p>
  <blockquote>
  <p>/tool.py download --from 1234 --interval 60</p>
  <p>/tool.py download --build 1432</p>
  <p>/tool.py clean --numbers 10</p>
  </blockquote>
  <p>So I want to use argparse to implement:</p>
  <ol>
  <li>ensure '--from' and '--interval' are always together used</li>
  <li>ensure '--build' is never used with other arguments</li>
  </ol>
  <p>But I didn't find a way to pair '--from' and '--internal' to a group, then make the group is mutual exclusive with '--build'.</p>
  <p>Below is my current code, and it only make the '--from' and '--build' are mutual exclusive. Neither ensure '--from' and '--interval' come together, nor ensure '--interval' and '--build' are mutual exclusive.</p>
  <pre><code>parser = argparse.ArgumentParser(description='A Tool')
  subparsers = parser.add_subparsers(help='sub-command help')
  
  #create the parser for the 'download' command
  download_parser = subparsers.add_parser('download', help='download help')
  download_parser.add_argument('--interval', dest='interval', type=int,help='interval help')
  group = download_parser.add_mutually_exclusive_group()
  group.add_argument('--from',type=int, help='from help')
  group.add_argument('--build', type=int, help='interval help')
  </code></pre>
  <p>For example,</p>
  <blockquote>
  <p>/tool.py download --from 1234</p>
  </blockquote>
  <p>should not be allowed because '--from' must work with '--interval'. But my code accepts it silently.</p>
  <p>And</p>
  <blockquote>
  <p>/tool.py download --interval 1234 --build 5678</p>
  </blockquote>
  <p>should not be allowed because '--build' can't be used with other argument. But my code accepts it too.</p>
  <p>Any suggestion will be highly appreciated. Thanks.</p>