When I run the below code, the child scripts no longer execute. How can I make the master script and other child scripts work once they turn into .exe?
I have created a masterscript using PysimpleGUI
and it works when I keep everything in script form using subprocess
This Master script works while as a .py form but not when I turn into a .exe using pyinstaller
import PySimpleGUI as sg
import subprocess
def A():
path = 'C:/python_work/'
os.chdir(path)
subprocess.call(['python', 'scripta.py'])
sg.PopupOK('All Done!')
def B():
path = 'C:/python_work/'
os.chdir(path)
subprocess.call(['python', 'scriptb.py'])
sg.PopupOK('Done')
func_dict = {'A':1, 'B':2}
I've tried an import scriptA
method but everytime it just runs the script instead of waiting for the GUI prompt.
As a note i've tried going into the child scripts and utilizing:
print('hello world')
if __name__ == "__main__":
This method hasn't worked, the scripts are 300 lines and don't like being put into def