From dc23fdf55561659f9e9cff51668ac9c6c027c885 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 14 Sep 2016 11:39:00 +0200 Subject: python: Import from __future__ to align behavior of Python 2.7. -- Signed-off-by: Justus Winter --- lang/python/examples/assuan.py | 3 +++ lang/python/examples/decryption-filter.py | 3 +++ lang/python/examples/delkey.py | 3 +++ lang/python/examples/encrypt-to-all.py | 3 +++ lang/python/examples/exportimport.py | 3 +++ lang/python/examples/genkey.py | 3 +++ lang/python/examples/inter-edit.py | 3 +++ lang/python/examples/sign.py | 3 +++ lang/python/examples/signverify.py | 3 +++ lang/python/examples/simple.py | 3 +++ lang/python/examples/testCMSgetkey.py | 3 +++ lang/python/examples/verifydetails.py | 3 +++ 12 files changed, 36 insertions(+) (limited to 'lang/python/examples') diff --git a/lang/python/examples/assuan.py b/lang/python/examples/assuan.py index e4822b72..22960d31 100644 --- a/lang/python/examples/assuan.py +++ b/lang/python/examples/assuan.py @@ -17,6 +17,9 @@ """Demonstrate the use of the Assuan protocol engine""" +from __future__ import absolute_import, print_function, unicode_literals +del absolute_import, print_function, unicode_literals + import pyme with pyme.Context(protocol=pyme.constants.PROTOCOL_ASSUAN) as c: diff --git a/lang/python/examples/decryption-filter.py b/lang/python/examples/decryption-filter.py index dbd66fc3..3007c2b0 100644 --- a/lang/python/examples/decryption-filter.py +++ b/lang/python/examples/decryption-filter.py @@ -24,6 +24,9 @@ be used like this: """ +from __future__ import absolute_import, print_function, unicode_literals +del absolute_import, print_function, unicode_literals + import sys import pyme pyme.Context().decrypt(sys.stdin, sink=sys.stdout) diff --git a/lang/python/examples/delkey.py b/lang/python/examples/delkey.py index 491f38a1..a02f4129 100755 --- a/lang/python/examples/delkey.py +++ b/lang/python/examples/delkey.py @@ -19,6 +19,9 @@ # Sample of key deletion # It deletes keys for joe@example.org generated by genkey.py script +from __future__ import absolute_import, print_function, unicode_literals +del absolute_import, print_function, unicode_literals + import pyme with pyme.Context() as c: diff --git a/lang/python/examples/encrypt-to-all.py b/lang/python/examples/encrypt-to-all.py index 304b4747..bb8225b0 100755 --- a/lang/python/examples/encrypt-to-all.py +++ b/lang/python/examples/encrypt-to-all.py @@ -22,6 +22,9 @@ This program will try to encrypt a simple message to each key on your keyring. If your keyring has any invalid keys on it, those keys will be skipped and it will re-try the encryption.""" +from __future__ import absolute_import, print_function, unicode_literals +del absolute_import, print_function, unicode_literals + import sys import os import pyme diff --git a/lang/python/examples/exportimport.py b/lang/python/examples/exportimport.py index 8d76fa13..bc946bc4 100755 --- a/lang/python/examples/exportimport.py +++ b/lang/python/examples/exportimport.py @@ -19,6 +19,9 @@ # Sample of export and import of keys # It uses keys for joe+pyme@example.org generated by genkey.py script +from __future__ import absolute_import, print_function, unicode_literals +del absolute_import, print_function, unicode_literals + import sys import os import pyme diff --git a/lang/python/examples/genkey.py b/lang/python/examples/genkey.py index 972fed79..ee70303d 100755 --- a/lang/python/examples/genkey.py +++ b/lang/python/examples/genkey.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see . +from __future__ import absolute_import, print_function, unicode_literals +del absolute_import, print_function, unicode_literals + import pyme # This is the example from the GPGME manual. diff --git a/lang/python/examples/inter-edit.py b/lang/python/examples/inter-edit.py index 2f8e4efe..459df114 100644 --- a/lang/python/examples/inter-edit.py +++ b/lang/python/examples/inter-edit.py @@ -18,6 +18,9 @@ """Simple interactive editor to test editor scripts""" +from __future__ import absolute_import, print_function, unicode_literals +del absolute_import, print_function, unicode_literals + import sys import pyme import pyme.constants.status diff --git a/lang/python/examples/sign.py b/lang/python/examples/sign.py index d3766833..2f235baf 100755 --- a/lang/python/examples/sign.py +++ b/lang/python/examples/sign.py @@ -16,6 +16,9 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see . +from __future__ import absolute_import, print_function, unicode_literals +del absolute_import, print_function, unicode_literals + import sys import pyme from pyme.constants.sig import mode diff --git a/lang/python/examples/signverify.py b/lang/python/examples/signverify.py index e7bf0c94..f12e0657 100755 --- a/lang/python/examples/signverify.py +++ b/lang/python/examples/signverify.py @@ -19,6 +19,9 @@ # Sample of unattended signing/verifying of a message. # It uses keys for joe+pyme@example.org generated by genkey.py script +from __future__ import absolute_import, print_function, unicode_literals +del absolute_import, print_function, unicode_literals + import sys import os import pyme diff --git a/lang/python/examples/simple.py b/lang/python/examples/simple.py index ca72cf11..ccd7cb49 100755 --- a/lang/python/examples/simple.py +++ b/lang/python/examples/simple.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see . +from __future__ import absolute_import, print_function, unicode_literals +del absolute_import, print_function, unicode_literals + import sys import os import pyme diff --git a/lang/python/examples/testCMSgetkey.py b/lang/python/examples/testCMSgetkey.py index fbaa042b..4467b6cc 100644 --- a/lang/python/examples/testCMSgetkey.py +++ b/lang/python/examples/testCMSgetkey.py @@ -18,6 +18,9 @@ """A test applicaton for the CMS protocol.""" +from __future__ import absolute_import, print_function, unicode_literals +del absolute_import, print_function, unicode_literals + import sys import pyme diff --git a/lang/python/examples/verifydetails.py b/lang/python/examples/verifydetails.py index 1cd538c7..63f40c14 100755 --- a/lang/python/examples/verifydetails.py +++ b/lang/python/examples/verifydetails.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see . +from __future__ import absolute_import, print_function, unicode_literals +del absolute_import, print_function, unicode_literals + import sys import os from pyme import core -- cgit v1.2.3