I manage a fairly large python code base (> 2000 lines) that I want to be accessible as a single executable python script anyway. So I'm looking for a method or tool to merge a development folder, made from different python files, into a single script run.
The thing / method I'm looking for should include splitting the code into different files, possibly with the source file __init___.py , which contains the import and combines it into one big script.
Much like a preprocessor. It’s best if you have a native path, it’s better if I can run dev from the folder anyway.
I already tested pypp and pypreprocessor, but they don't seem to understand.
Something like the weird use of __import__() or maybe a bundle from foo import * is being replaced by preprocessor code? Obviously, I want to combine only my catalog, not shared libraries.
Update. What I want is to accurately support the code as a package, and then be able to "compile" it into a single script, easy to copy-paste, distribute and reuse.
source share