Hello all! I have a question about the behavior of gnupg's init()
function, which I'm finding to be a bit strange.
When I run gnupg.GPG(), without the gnupghome parameter, it defaults
sensibly to the home directory of the current user, which is what I
want. However, if I don't want to rely on the default behavior and
instead wish to set it manually, I'm using a line like this:
gpg = gnupg.GPG(gnupghome=os.environ['HOME'])
which doesn't appear to work.
I'm testing them by then running gpg.list_keys().
gpg = gnupg.GPG()
gpg.list_keys()
returns the same list of keys as if I run $ gpg --list-keys in my
terminal
gpg = gnupg.GPG(gnupghome=os.environ['HOME'])
gpg.list_keys()
returns an empty list.
I know I can get the job done just using the default __init__, but
this behavior seems strange and inconsistent. I'd really appreciate it
if somebody could help me understand it!
For reference, I'm running Ubuntu 10.10, Python 2.6.6, and python-
gnupg 0.2.8.