I'm working on a project where I would like to run a same script but with two different softwares api.
What I have : -One module for each software where I have the same classes and methods names. -One construction script where I need to call these classes and method.
I would like to not duplicate the construction code, but rather run the same bit of code just by changing the imported module.
Exemple :
first_software_module.py
import first_software_api
class Box(x,y,z):
   init():
       first_software_api.makeBox()
second_software_module.py
import second_software_api
class Box(x,y,z):
    init():
        second_software_api.makeBox()
construction.py
first_box = Box(1,2,3)
And I would like to run construction.py with the first module, then with the second module. I tryed with imports, execfile, but none of these solutions seems to work.
What i would like to do :
import first_software_module
run construction.py
import second_software_module
run construction.py


construction& let it import it & run it?