简体   繁体   中英

program running programs in python

I am a Python beginner (using 2.7) and want to know if there is a way for a program that I have written to run other programs.

Basically, I want to build a program that evaluates other programs.

Check out the subprocess module. One of the examples given there:

>>> subprocess.check_output(["echo", "Hello World!"])
'Hello World!\n'

That should be pretty much all you need

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM