I already have
import os
exec(os.popen("Packman Game.py").read()
But it doesn't do anything and doesn't give me an error message What do I need to do?
PS:Without typing into the shell.
Or you can also use subprocess :
<!-- language: python -->
import subprocess
result = subprocess.check_output("Packman Game.py",shell=True)
If you want to read the result.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.