title: How to prevent decompilation or inspecting python code?
body: <p>let us assume that there is a big, commercial project (a.k.a Project), which uses Python under the hood to manage plugins for configuring new control surfaces which can be attached and used by Project.</p>
  
  <p>There was a small information leak, some part of the Project's Python API leaked to the public information and people were able to write Python scripts which were called by the underlying Python implementation as a part of Project's plugin loading mechanism.</p>
  
  <p>Further on, using <code>inspect</code> module and raw <code>__dict__</code> readings, people were able to find out a major part of Project's underlying Python implementation.</p>
  
  <p>Is there a way to keep the Python secret codes secret?</p>
  
  <p>Quick look at Python's documentation revealed a way to suppres a import of <code>inspect</code> module this way:</p>
  
  <pre><code>import sys
  sys.modules['inspect'] = None
  </code></pre>
  
  <p>Does it solve the problem completely?</p>