title: Repeated import path patterns in python
body: <p>Is there any alternative to prevent typing repeated long paths while importing modules in python.</p>
  
  <p>Current code:</p>
  
  <pre><code>from a.b.c.d.e.f.g import g1
  from a.b.c.d.e.f.g import g2
  from a.b.c.d.e.f.g.h import h1
  from a.b.c.d.e.f.g.i import i1
  </code></pre>
  
  <p>I tried following code:</p>
  
  <pre><code>ref_path = a.b.c.d.e.f.g
  from ref_path import g1
  from ref_path import g2
  from ref_path.h import h1
  from ref_path.i import i1
  </code></pre>
  
  <p>But unfortunately it did not work. I cannot do from <code>a.b.c.d.e.f.g import *</code> since there might be too many modules within the <code>ref_path</code>.</p>
  
  <p>If I am able to do this, I could easily maintain different common <code>ref_paths</code> used in different modules from one common location with minimal efforts.</p>