Say I have a file x.py
and another file y.py
.
In a C program , the preprocessor would simply copy the contents of x
and replace #include x.py
with them, and similarly with y
.
Python does not preprocess like that - there is no #include
; import
works very differently from simple text substitution/replacement, which is what I want (the end result should be one single file that has everything, but it isn't practical to work with such a file during development).
What I'm currently using is essentially something like : cat globals.py functions.py main.py > final.py