Preface: I've already seen this post. Please link other posts if this question has already been asked.
I'm calling a function from the imported module using the module.function() approach from the linked response above. However, the specific function I'm calling calls another function from the same module that was imported. How do you call a function that requires a call to another function inside of it? Here's an example to illustrate:
file1.py
def func_one(graphResultsPath,x,y,path):
spec = importlib.util.spec_from_file_location('graphResults',graphResultsPath)
graphResults = importlib.util.module_from_spec(spec)
sys.modules[spec.name] = graphResults
spec.loader.exec_module(graphResults)
graphResults.create_plot(x,y,path)
graphResults.py
def create_plot(x,y,path):
fig1 = plt.figure(num=1)
plt.plot(x,y)
plt.savefig(path)
add_fig_to_pptx(path)
def add_fig_to_pptx(path):
...