title: Python preprocessing imports
body: <p>I am managing a quite large python code base (>2000 lines) that I want anyway to be available as a single runnable python script. So I am searching for a method or a tool to merge a development folder, made of different python files into a single running script. </p>
  
  <p>The thing/method I am searching for should take code split into different files, maybe with a starting <code>__init___.py</code> file that contains the imports and merge it into a single, big script.</p>
  
  <p>Much like a preprocessor. Best if a near-native way, better if I can anyway run from the dev folder.</p>
  
  <p>I have already checked out pypp and pypreprocessor but they don't seem to take the point.</p>
  
  <p>Something like a strange use of <code>__import__()</code> or maybe a bunch of <code>from foo import *</code> replaced by the preprocessor with the code? Obviously I only want to merge my directory and not common libraries.</p>
  
  <p><strong>Update</strong>
  What I want is exactly mantaining the code as a package, and then being able to "compile" it into a single script, easy to copy-paste, distribute and reuse.</p>