title: How to combine and get a single Python file by resolving the imports
body: <p>I am trying to get a single Python file as a output. I have a Python script that has several imports of the kind:</p>
  
  <pre><code>from that import sub
  </code></pre>
  
  <p>The imports are from all local modules and nothing from the system or Python libraries. Is there any way to resolve those and get a single complete code file? That is, can I include all the method/function definitions into final file?</p>
  
  <p>I can do this manually, but there are many imports. Is there already some way to do this?</p>
  
  <p>My Python version is 2.4.3.</p>