Python - how do I call external python programs?

前端 未结 4 1611
轮回少年
轮回少年 2020-12-17 08:45

I\'ll preface this by saying it\'s a homework assignment. I don\'t want code written out for me, just to be pointed in the right direction.

4条回答
  •  难免孤独
    2020-12-17 08:50

    Also if you need to pass additional arguments do this:

    import subprocess
    subprocess.call(["python", "myscript.py", "arg1", "arg2", "argN"])
    

提交回复
热议问题