Howdy,

python-gnupg is a python wrapper for the gnupg library. It is a separate
project from py-gnupg, but offers similar functionality. You can read
more about it here:

https://code.google.com/p/python-gnupg/
http://pythonhosted.org/python-gnupg/

Here's some example code just for the fun of it:

#!/usr/bin/env python2
import gnupg
from os import popen

gnupgDir = "/home/user/.gnupg"
encryptedFile = "/home/user/fake.gpg"

gpg = gnupg.GPG(gnupghome=gnupgDir)
stream = open(encryptedFile, "rb")
decryptedData = str(gpg.decrypt_file(stream)).split()
print(decryptedData)

- Kyle

Attachment: pgp96AE2yx466.pgp
Description: PGP signature

Reply via email to