小编VJG*_*VJG的帖子

如何在python中包含“输入键”

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
Run Code Online (Sandbox Code Playgroud)

通过子进程我试图获取密钥库证书详细信息我不知道密钥库的密码。如果我按两次“输入键”,则输出正在处理

有没有办法在python中自动执行“输入键”?

python enter key

-7
推荐指数
1
解决办法
3万
查看次数

标签 统计

enter ×1

key ×1

python ×1