title: How to make an external module local
body: <p>My code depends on functions from a module <code>external_module</code> which is in my pythonpath path and which I include as</p>
  
  <pre><code># global import
  import external_module.sub_mod_one as smo
  </code></pre>
  
  <p>Now I want to share my code but I don't want to force my collaborators to checkout my other git repos and add them to their environment.</p>
  
  <p>So, I thought I can copy the files to the local directory and rewrite the import as</p>
  
  <pre><code># local import
  import sub_mod_one as smo
  </code></pre>
  
  <p>However, since development goes on, I don't want to do this manually. </p>
  
  <p><strong>Question</strong> Is there a python module or vim plugin or something else that does this for me? Namely, copying the the included modules to the current folder and rewriting the import statements?</p>