python: examples
authorBen McGinnes <ben@adversary.org>
Wed, 26 Dec 2018 00:01:33 +0000 (11:01 +1100)
committerBen McGinnes <ben@adversary.org>
Wed, 2 Jan 2019 00:08:43 +0000 (11:08 +1100)
* Fixed inter-edit.py so it will actually work now.
* made 3 others executable.
* Fixed the semantics of assuan.py's instructions.

Tested-by: Ben McGinnes <ben@adversary.org>
Signed-off-by: Ben McGinnes <ben@adversary.org>
lang/python/examples/assuan.py [changed mode: 0644->0755]
lang/python/examples/decryption-filter.py [changed mode: 0644->0755]
lang/python/examples/inter-edit.py [changed mode: 0644->0755]
lang/python/examples/testCMSgetkey.py [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 1b04184..d0fc3a4
 # along with this program; if not, see <https://www.gnu.org/licenses/>.
 """A decryption filter
 
-This demonstrates decryption using gpg3 in three lines of code.  To
+This demonstrates decryption using gpg in three lines of code.  To
 be used like this:
 
-./decryption-filter.py <message.gpg >message.plain
+./decryption-filter.py < message.gpg > message.plain
 
 """
 
old mode 100644 (file)
new mode 100755 (executable)
index f11bb25..2fd74c2
@@ -40,10 +40,7 @@ with gpg.Context() as c:
     print("Editing key {} ({}):".format(key.uids[0].uid, key.subkeys[0].fpr))
 
     def edit_fnc(keyword, args):
-        print(
-            "Status: {}, args: {} > ".format(keyword, args),
-            end='',
-            flush=True)
+        print("Status: {}, args: {} > ".format(keyword, args), end="")
 
         if 'GET' not in keyword:
             # no prompt
old mode 100644 (file)
new mode 100755 (executable)