Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Question about gnupg.GPG()
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Garrett Robinson  
View profile  
 More options Sep 27 2011, 7:28 pm
From: Garrett Robinson <garrett.f.robin...@gmail.com>
Date: Tue, 27 Sep 2011 16:28:20 -0700 (PDT)
Local: Tues, Sep 27 2011 7:28 pm
Subject: Question about gnupg.GPG()
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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vinay Sajip  
View profile  
 More options Sep 27 2011, 8:37 pm
From: Vinay Sajip <vinay_sa...@yahoo.co.uk>
Date: Tue, 27 Sep 2011 17:37:37 -0700 (PDT)
Local: Tues, Sep 27 2011 8:37 pm
Subject: Re: Question about gnupg.GPG()
On Sep 28, 12:28 am, Garrett Robinson <garrett.f.robin...@gmail.com>
wrote:

> 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'])

I think that the default home directory for gnu is $HOME/.gnupg, not
$HOME. Try that and see if it works.

Regards,

Vinay Sajip


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »