There are multiple ways to make one Python file run another.
1. Use it like a module. import the file you want to run and run its functions. For example, say you want to import fileB.py into fileA.py, assuming the files are in the same directory, inside fileA you'd write
Now in fileA, you can call any function inside fileB like:
2. You can use the exec command.
executes the file.py file in the interpreter.
3. You can spawn a new process using the os.system command.