您好,我正在创建一个使用nircmd
. 命令已执行,但应用程序在此屏幕上暂停
有什么办法可以摆脱这个屏幕吗?[nircmd.exe复制到我的windows目录]
编码:
import socket
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.bind(('localhost',5000))
s.listen(5)
c,addr=s.accept()
c.send("Enter command for nircmd: ".encode())
cmd=c.recv(1024)
cmd=cmd.decode()
cmd="nircmd "+str(cmd)
c.send(cmd.encode())
exe=subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
out,err=exe.communicate()
out=out+err
c.sendall(out)