1

I'm trying to call a python program from inside a program what do I use. I have a python file that checks a file name and if it's a certain file I want to run another program. Any suggestions on what to use.

Bill Judge
  • 23
  • 7
  • Your question may have been answered [here](https://stackoverflow.com/questions/1186789/what-is-the-best-way-to-call-a-script-from-another-script). – Tytrox Apr 27 '21 at 01:02

1 Answers1

1

You can use the os.system command.

    import os
    os.system('python my_file.py')

i got this from https://www.tutorialspoint.com/How-can-I-make-one-Python-file-run-another

coder
  • 151
  • 1
  • 13