Send text to a window (Python)


I have to execute a cmd command from python and I do it using subprocess:

The command in cmd would be "gpg -d filenameEncriptado.gpg", in python it would be something like this:

import subprocess['gpg' ,'-d', 'nombreArchivoEncriptado.gpg'])

At that moment I get a window to enter the key with which to decrypt the file and I do not know how to send text to that window, gpg does not have a command in "-password password" plan to put as an argument later and I am without ideas.

Thanks in advance.

asked by Oscar 05.12.2018 в 22:24

0 answers