title: Using python's argparse in multiple scripts backed by multiple custom modules
body: <p>I'm building out a set of scripts and modules for managing our infrastructure.  To keep things organized I'd like to consolidate as much effort as possible and minimize boiler plate for newer scripts.</p>
  
  <p>In particular the issue here is to consolidate the ArgumentParser module.</p>
  
  <p>An example structure is to have scripts and libraries organized something like this:</p>
  
  <pre><code>|-- bin
      |-- script1
      |-- script2
  |-- lib
      |-- logger
      |-- lib1
      |-- lib2
  </code></pre>
  
  <p>In this scenario <code>script1</code> may only make use of <code>logger</code> and <code>lib1</code>, while <code>script2</code> would make use of <code>logger</code> and <code>lib2</code>.  In both cases I want the logger to accept '-v' and '-d', while <code>script1</code> may also accept additional args and <code>lib2</code> other args.  I'm aware this can lead to collisions and will manage that manually.</p>
  
  <p><strong>script1</strong></p>
  
  <pre><code>#!/usr/bin/env python
  import logger
  import lib1
  argp = argparse.ArgumentParser("logger", parent=[logger.argp])
  </code></pre>
  
  <p><strong>script2</strong></p>
  
  <pre><code>#!/usr/bin/env python
  import logger
  import lib2
  </code></pre>
  
  <p><strong>logger</strong></p>
  
  <pre><code>#!/usr/bin/env python
  import argparse
  argp = argparse.ArgumentParser("logger")
  argp.add_argument('-v', '--verbose', action="store_true", help="Verbose output")
  argp.add_argument('-d', '--debug', action="store_true", help="Debug output. Assumes verbose output.")
  </code></pre>
  
  <p>Each script and lib could potentially have it's own arguments, however these would all have to be consolidated into one final arg_parse()</p>
  
  <p>My attempts so far have resulted in failing to inherit/extend the argp setup.  How can this be done in between a library file and the script?</p>