GPG wrapper, ECC 25519 compatible?
Johannes Bauer
dfnsonfsduifb at gmx.de
Tue Sep 3 02:42:54 EDT 2019
On 03.09.19 05:28, rmlibre at riseup.net wrote:
> But I just don't understand how to get
> and pass information back to the gpg command line prompts at all, not to
> mention automating the process.
The manpage describes how to enable the machine-parsable interface,
which is exactly what you want. Then:
import subprocess
inputs = [
"11",
"Q",
"1",
"0",
"y",
"username",
"username at user.net",
"none",
"O",
]
input_data = ("\n".join(inputs) + "\n").encode()
subprocess.check_output([ "gpg2", "--expert", "--full-gen-key",
"--with-colons", "--command-fd", "0", "--status-fd", "1" ], input =
input_data)
Cheers,
Joe
--
"Performance ist nicht das Problem, es läuft ja nachher beides auf der
selben Hardware." -- Hans-Peter Diettrich in d.s.e.
More information about the Python-list
mailing list