title: Import Python module from memory
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1830727/how-to-load-compiled-python-modules-from-memory">How to load compiled python modules from memory?</a>  </p>
  </blockquote>
  
  
  
  <p>I have some Python file in the memory that may be StringIO. How can I import module file stored in the memory? I do not want to save it to disk and then load.</p>
  
  <p>It looks like:</p>
  
  <pre><code>import StringIO.StrngIO([buf]) 
  </code></pre>