docs: python bindings howto

* Updated groups work around example to make sure it uses the correct
  version of gpgconf for the user invoking it (determined by the
  engine info).
This commit is contained in:
Ben McGinnes 2018-03-30 14:10:24 +11:00
parent fed024eff1
commit de11f557a8

View File

@ -1334,9 +1334,12 @@
this information in Python.
#+begin_src python
import gpg
import subprocess
lines = subprocess.getoutput("gpgconf --list-options gpg").splitlines()
gpgconf = gpg.core.get_engine_info()[2].file_name
gpgconf_cmd "{0} --list-options gpg".format(gpgconf)
lines = subprocess.getoutput(gpgconf_cmd).splitlines()
for i in range(len(lines)):
if lines[i].startswith("group") is True: