python: examples

* 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>
This commit is contained in:
Ben McGinnes 2018-12-26 11:01:33 +11:00
parent 06bca0eaa8
commit d406471d4b
4 changed files with 3 additions and 6 deletions

0
lang/python/examples/assuan.py Normal file → Executable file
View File

4
lang/python/examples/decryption-filter.py Normal file → Executable file
View File

@ -16,10 +16,10 @@
# 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
"""

5
lang/python/examples/inter-edit.py Normal file → Executable file
View File

@ -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

0
lang/python/examples/testCMSgetkey.py Normal file → Executable file
View File