aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/examples/genkey.py
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <[email protected]>2016-10-28 20:45:49 +0000
committerJustus Winter <[email protected]>2016-10-31 14:42:27 +0000
commit2fac017618a76882605125b05ff1f7393fe99860 (patch)
treeb7eddc17682b6aa91b8c3c723a2fc02f28ac0a6c /lang/python/examples/genkey.py
parentcore: New API functions gpgme_set_sender, gpgme_get_sender. (diff)
downloadgpgme-2fac017618a76882605125b05ff1f7393fe99860.tar.gz
gpgme-2fac017618a76882605125b05ff1f7393fe99860.zip
python: Rename Python module from PyME to gpg.
This follows weeks of discussion on the gnupg-devel mailing list. Hopefully it will make it easier for people using Python to use GnuPG in the future. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
Diffstat (limited to 'lang/python/examples/genkey.py')
-rwxr-xr-xlang/python/examples/genkey.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lang/python/examples/genkey.py b/lang/python/examples/genkey.py
index ee70303d..a043500e 100755
--- a/lang/python/examples/genkey.py
+++ b/lang/python/examples/genkey.py
@@ -20,7 +20,7 @@
from __future__ import absolute_import, print_function, unicode_literals
del absolute_import, print_function, unicode_literals
-import pyme
+import gpg
# This is the example from the GPGME manual.
@@ -31,14 +31,14 @@ Subkey-Type: RSA
Subkey-Length: 2048
Name-Real: Joe Tester
Name-Comment: with stupid passphrase
-Name-Email: [email protected]
+Name-Email: [email protected]
Passphrase: Crypt0R0cks
Expire-Date: 2020-12-31
</GnupgKeyParms>
"""
-with pyme.Context() as c:
- c.set_progress_cb(pyme.callbacks.progress_stdout)
+with gpg.Context() as c:
+ c.set_progress_cb(gpg.callbacks.progress_stdout)
c.op_genkey(parms, None, None)
print("Generated key with fingerprint {0}.".format(
c.op_genkey_result().fpr))