在用PYQT编写GUI界面时,代码中有用到subprocess.Popen(),打包exe后每次遇到subprocess语句是就会弹出命令框,很是头疼,
下面是解决的办法
import subprocessst=subprocess.STARTUPINFOst.dwFlags=subprocess.STARTF_USESHOWWINDOWst.wShowWindow=subprocess.SW_HIDEsubprocess.Popen("adb devices", stdin=subprocess.PIPE,stdout=subprocess.PIPE, stderr=subprocess.PIPE,startupinfo=st)