import osmystr=os.popen("tasklist") #popen与system可以执行指令,popen可以接受返回对象mystr=mystr.read() #读取输出print("hello",mystr)if mystr.find("QQ.exe") !=-1: print("发现QQ")else: print("QQ已死有事请烧纸")
Python Windows 执行cmd命令 popen
最新推荐文章于 2025-03-22 16:05:31 发布