Popen調用後無需等待,直接執行下面的代碼
def run_server(server_path):
import subprocess
login_info = [server_path]
subprocess.Popen(login_info)
check_all 等待調用的程序執行結束後再運行
def login()
login_info = ['C:\\Program Files (x86)\\SAP\\FrontEnd\\SAPgui\\sapshcut.exe', '-system=PRD', '-client=110','-l=ZH', '-user=用戶名', '-pw=密碼']
subprocess.check_call(login_info)
login()
參考
https://blog.csdn.net/weixin_42541463/article/details/113644610