title: Prevent Python packages from re-exporting imported names
body: <p>In a Python package, I have the file structure</p>
  
  <pre><code>package/
      __init__.py
      import_me.py
  </code></pre>
  
  <p>The file <code>import_me.py</code> is thought to provide snippets of functionality:</p>
  
  <pre><code>import re
  import sys
  
  def hello():
      pass
  </code></pre>
  
  <p>so that <code>package.import_me.hello</code> can be imported dynamically via <code>import</code>. Unfortunately, this also allows to import <code>re</code> and <code>sys</code> as <code>package.import_me.re</code> and <code>package.import_me.sys</code>, respectively.</p>
  
  <p>Is there a way to prevent the imported modules in <code>import_me.py</code> to be re-exported again? Preferably this should go beyond name mangling or underscore-prefixing imported modules, since in my case it might pose a security problem under certain instances.</p>