It seems, that most of the people who answers did not get the question correctly (I hope, I did). The question is not about "how to avoid having multiple imports"... It's about: "how to get single python script from multiple python modules?"
I have the same question. And the use case is following:
I develop some extension for some system with web-based GUI. The extensions are written in python. The systems itself exposes some of its facilities through its python API. But due to restrictions of the system it can only work with single-file modules. I.e. I have to keep all my code in one file. On the other hand the scripts tend to become quite complicated (thousands of lines) and also it is desirable to re-use some common functions (logging, error handling etc.) with some mechanism, which is more intelligent, than copy-paste.
What comes to mind is to do development normally with modules. And then use some "builder", which would take all the modules used in particular end-use script and combine them together into single file.
And now the question is: Does such a "builder" exists?
Note, that use of py2exe is not an option, as I need python source file as an output.
The only ready made solution, which I found was given in the discussion already mentioned by jonrsharpe above here.
It is Breeder tool. Being honest, I did not try it, but according to description it is supposed to do what is required.
As of me, I decided to develop my own tool, which handles some special points (as printing out correct line numbers in the exception traps etc.). But it is still work in progress, so I cannot share it now.