2024-04-23 16:24:26 发布
网友
我用这段代码来启动批处理文件,但是
import os os.startfile("C:\Documents and Settings\Zha\Desktop\Strings\strings.exe ")
在字符串.exe从cmd打开批处理命令时运行它,如下所示:
我需要从python运行它。可能的解决方法?在
from subprocess import Popen, PIPE handle = Popen(['strings', '-q', 'C:\\Documents and Settings\\Zha\\Desktop\\folder\\*'], stdout=PIPE) while handle.poll() is None: print(handle.stdout.readline()) handle.stdout.close()
相关问题 更多 >
编程相关推荐