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
through subprocess i trying to fetch keystore certificate details I don't know password for keystore. If i press "enter key" twice then output is processing
Is there any way to automate "Enter key" in python?