python怎么读取py文件使⽤python命令执⾏py⽂件并传参1、命令如下:
⾃定义命令 command = "python " + os.getcwd() + "/" + "test.py 参数1 参数2 ..."
执⾏命令 os.system(command)
# coding=utf-8
import os
if __name__ == "__main__":
  command = "python " + os.getcwd() + "/" + "appmain.py gate_1 config.json"
  os.system(command)

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。