简体   繁体   中英

Python running many scripts from one

I have many python scripts I would like to run in succession (or concurrently).

For example: program1.py -

program2.py -

program 1 and 2 execute equivalent commands but for different sets of input.

program3.py combines output from program 1 and 2 and produces additional output. I have many of these. Eventually they produce one final output from everything. It is necessary to keep them organized this way.

Is there a best way to go about this?

I have tried importing as a module but seems there is probably a much better way.

你只需要使用子进程: https : //docs.python.org/2/library/subprocess.html

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