diff options
author | Justus Winter <[email protected]> | 2016-05-17 12:15:21 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-05-17 12:22:22 +0000 |
commit | 10328324c8fc9725cd0c885eaebfc80dc32c1ff6 (patch) | |
tree | 425531ecd2daf5eb85caf1229b62a0834ec6132b /lang/python/examples/t-edit.py | |
parent | python: Import GPGMEError. (diff) | |
download | gpgme-10328324c8fc9725cd0c885eaebfc80dc32c1ff6.tar.gz gpgme-10328324c8fc9725cd0c885eaebfc80dc32c1ff6.zip |
python: Clean up examples.
* lang/python/examples/delkey.py: Clean up example.
* lang/python/examples/encrypt-to-all.py: Likewise.
* lang/python/examples/genkey.py: Likewise.
* lang/python/examples/inter-edit.py: Likewise.
* lang/python/examples/sign.py: Likewise.
* lang/python/examples/signverify.py: Likewise.
* lang/python/examples/simple.py: Likewise.
* lang/python/examples/t-edit.py: Likewise.
* lang/python/examples/verifydetails.py: Likewise.
* lang/python/pyme/__init__.py: Likewise.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | lang/python/examples/t-edit.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lang/python/examples/t-edit.py b/lang/python/examples/t-edit.py index 5e5857a2..5c35f966 100644 --- a/lang/python/examples/t-edit.py +++ b/lang/python/examples/t-edit.py @@ -30,8 +30,8 @@ class KeyEditor: def edit_fnc(self, status, args, out): print("[-- Response --]") - out.seek(0,0) - print(out.read(), end=' ') + out.seek(0, os.SEEK_SET) + sys.stdout.buffer.write(out.read()) print("[-- Code: %d, %s --]" % (status, args)) if args == "keyedit.prompt": @@ -59,5 +59,5 @@ else: "Did you point GNUPGHOME to GPGME's tests/gpg dir?") c.op_edit(key, KeyEditor().edit_fnc, out, out) print("[-- Last response --]") - out.seek(0,0) - print(out.read(), end=' ') + out.seek(0, os.SEEK_SET) + sys.stdout.buffer.write(out.read()) |