Popen调用后无需等待,直接执行下面的代码
def run_server(server_path):
import subprocess
login_info = [server_path]
subprocess.Popen(login_info)
check_call 等待调用的程序执行结束后再运行
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