Запустите файл py в другом файле PY
os.system('python my_file.py')
Tremendous Enceladus
os.system('python my_file.py')
import fileB #Replace fileB with the apportite file name
fileB.my_func() #Can replace 'my_fun' with a function from the second .py file
execfile('file.py') #Executes the .py file
exec(open('file.py').read())
import myfile
myfile.myfunction
#calls a specific function from within the file