diff options
author | Justus Winter <[email protected]> | 2016-05-11 11:51:40 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-05-11 11:51:40 +0000 |
commit | bbeee5e1a060f2d1e37a08220eb552cf4673a058 (patch) | |
tree | b10fe9fe14c0ad186e971763c336fc76daefe12a /lang/python/examples/simple.py | |
parent | python: Integrate into the build system. (diff) | |
download | gpgme-bbeee5e1a060f2d1e37a08220eb552cf4673a058.tar.gz gpgme-bbeee5e1a060f2d1e37a08220eb552cf4673a058.zip |
python: Fix simple example.
* lang/python/examples/simple.py: Flush stdout, encode name as
UTF-8 before passing it to GPGME.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'lang/python/examples/simple.py')
-rwxr-xr-x | lang/python/examples/simple.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lang/python/examples/simple.py b/lang/python/examples/simple.py index 5693d40a..739291ed 100755 --- a/lang/python/examples/simple.py +++ b/lang/python/examples/simple.py @@ -36,8 +36,9 @@ c.set_armor(1) # Set up the recipients. sys.stdout.write("Enter name of your recipient: ") +sys.stdout.flush() name = sys.stdin.readline().strip() -c.op_keylist_start(name, 0) +c.op_keylist_start(name.encode(), 0) r = c.op_keylist_next() if r == None: |