-2

What is the python command to run a py-file.?

For example, in my index.py file how would i launch start.py.

Deepend
  • 3,873
  • 17
  • 56
  • 97
Sergey
  • 811
  • 2
  • 9
  • 22

1 Answers1

2

In index.py, simply use subprocess:

import subprocess
subprocess.check_output(["python", "start.py"])
Uli Köhler
  • 12,474
  • 14
  • 64
  • 110