【发布时间】:2018-09-16 07:15:23
【问题描述】:
import subprocess
path = '/home/test/net.keystore'
text = subprocess.Popen(['keytool', '-list', '-v', '-keystore', path], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
file = text.stdout.read().decode().splitlines()
print file
通过子进程我尝试获取密钥库证书详细信息 不知道密钥库的密码。如果我按两次“输入键”然后 输出正在处理中
有没有办法在 python 中自动执行“Enter key”?
【问题讨论】:
-
附加代码怎么样...
-
代码中没有两次要求输入键?
-
关闭后再打开?
-
抱歉错过了代码