How to import a submodule alone in Python?
<p>I have this structure: </p>

<pre><code>.
└── module
    ├── __init__.py
    └── submodule
        ├── __init__.py
        ├── foo.py
        └── bar.py
</code></pre>

<p>In <code>module.submodule.__init__.py</code> I have this: </p>

<pre><code>import foo
import bar
</code></pre>

<p>In <code>module.submodule.foo.py</code> I have this: </p>

<pre><code>import very_heavy_third_party_module as vhtpm
...
</code></pre>

<p>I would like to import <code>bar</code> only, but I got slowed down by <code>foo</code> (let's imagine there is an ugly <code>time.sleep(3)</code> in both <code>foo</code> and <code>module/__init__.py</code>). </p>

<p>So my goal is to write this below without getting slowed down by other parts of my module:</p>

<pre><code>from module.submodule.bar import saybar
saybar()
</code></pre>

<p>How can I just import <code>saybar</code> located in my submodule <code>bar</code>?</p>