aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/examples/simple.py
diff options
context:
space:
mode:
authorBen McGinnes <[email protected]>2018-08-18 08:46:47 +0000
committerBen McGinnes <[email protected]>2018-08-18 08:46:47 +0000
commitb5fbe90676f46b9615919133753a65b20318fe63 (patch)
tree2a2a31396434844b266813fd96c5d089570536c3 /lang/python/examples/simple.py
parentPython bindings setup: Near PEP8 compliance (diff)
downloadgpgme-b5fbe90676f46b9615919133753a65b20318fe63.tar.gz
gpgme-b5fbe90676f46b9615919133753a65b20318fe63.zip
Python bindings examples: PEP8 conpliance
* Appears to be complete compliance.
Diffstat (limited to 'lang/python/examples/simple.py')
-rwxr-xr-xlang/python/examples/simple.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lang/python/examples/simple.py b/lang/python/examples/simple.py
index 8f451d7c..17c3eba0 100755
--- a/lang/python/examples/simple.py
+++ b/lang/python/examples/simple.py
@@ -18,11 +18,12 @@
# along with this program; if not, see <http://www.gnu.org/licenses/>.
from __future__ import absolute_import, print_function, unicode_literals
-del absolute_import, print_function, unicode_literals
import sys
import gpg
+del absolute_import, print_function, unicode_literals
+
with gpg.Context(armor=True) as c:
recipients = []
print("Enter name of your recipient(s), end with a blank line.")
@@ -40,8 +41,8 @@ with gpg.Context(armor=True) as c:
if not recipients:
sys.exit("No recipients.")
- print("Encrypting for {}.".format(", ".join(k.uids[0].name
- for k in recipients)))
+ print("Encrypting for {}.".format(", ".join(
+ k.uids[0].name for k in recipients)))
ciphertext, _, _ = c.encrypt(b"This is my message,", recipients)
sys.stdout.buffer.write(ciphertext)