I use python to patch system settings of linux systems distributed with partimage. I want to have the following python script structure:
/patch.d/
10_patch_netwok.py
20_patch_hostname.py
...
50_patch_software_xyz.py
InitSystem.py
The InitSytem.py
should run the python scripts in /patch.d
folder. Following my idea (brainstorm):
files = glob.glob("patch.d/*.py")
files.sort()
for file in files:
execfile(file, ...)
What's the recommend way to load python scripts and run them from another python script?