python: Fix type translation.
authorJustus Winter <justus@gnupg.org>
Thu, 12 May 2016 09:21:58 +0000 (11:21 +0200)
committerJustus Winter <justus@gnupg.org>
Thu, 12 May 2016 09:49:17 +0000 (11:49 +0200)
commitd60deb8a127fb35c01acc729f33b014840af0e7b
treed5188d0cc07273b80e6728b1e95fc757c7630e5d
parentbbeee5e1a060f2d1e37a08220eb552cf4673a058
python: Fix type translation.

* lang/python/gpgme.i: Adjust to Python3's string type being
'Unicode', not 'bytes'.  Fix type checking.
* lang/python/core.py (Data.write): Add docstring mentioning the
expected type of parameter 'buffer'.
(Data.read): Adjust read loop.  Also, use a saner chunk size, and join
all chunks at the end instead of adding them.
* lang/python/examples/simple.py: Adjust example.

Signed-off-by: Justus Winter <justus@gnupg.org>
lang/python/examples/simple.py
lang/python/gpgme.i
lang/python/pyme/core.py