How to run a python script from another python script and get the returned status code?

前端 未结 2 1847
有刺的猬
有刺的猬 2021-01-12 16:20

I\'m relatively new to both Python and bash. However, I am finding Python much more intuitive and easier than bash. I have a few bash scripts I have managed to cobble togeth

2条回答
  •  隐瞒了意图╮
    2021-01-12 16:47

    I would suggest you to look at the subprocess module in python. You can start another process using it, manipulate its streams and get the return code.

提交回复
热议问题