python 调用bat

import os
import socket
import subprocess
import win32api
from utils.Logger import Logger


def start():
  cmd="C:\\Users\\wysengine\\Desktop\\采集软件启动脚本\\xxx.bat"
  win32api.ShellExecute(0, 'open', cmd, '', '', 1)  # 前台打开

start()
print(1)


 

你可能感兴趣的:(python,python)