gpgme/lang/python/pyme
Justus Winter 2ae847c027 python: Implement data callbacks.
* lang/python/gpgme.i (object_to_gpgme_t): Set exception on error.
* lang/python/helpers.c (pyDataReadCb): New function.
(pyDataWriteCb): Likewise.
(pyDataSeekCb): Likewise.
(pyDataReleaseCb): Likewise.
(pygpgme_data_new_from_cbs): Likewise.
* lang/python/helpers.h (pygpgme_data_new_from_cbs): New prototype.
* lang/python/pyme/core.py (Data.__init__): Fix docstring, fix read
callbacks.
(Data.__del__): Fix read callbacks.
(Data._free_readcb): Drop function.
(Data._free_datacbs): New function.
(Data.new_from_cbs): Fix setting the callbacks.
(Data.write): Raise stashed exceptions.
(Data.read): Likewise.
* lang/python/tests/t-callbacks.py: Test new functionality.
* lang/python/tests/t-data.py: Likewise.

Signed-off-by: Justus Winter <justus@gnupg.org>
2016-05-27 14:04:28 +02:00
..
constants python: Rename bindings. 2016-05-10 13:19:26 +02:00
__init__.py python: Clean up examples. 2016-05-17 14:22:22 +02:00
callbacks.py python: Delete trailing whitespace. 2016-05-10 13:30:30 +02:00
core.py python: Implement data callbacks. 2016-05-27 14:04:28 +02:00
errors.py python: Make all GnuPG errors available. 2016-05-24 18:00:16 +02:00
util.py python: Move the base wrapper class. 2016-05-24 18:00:16 +02:00
version.py python: Rename bindings. 2016-05-10 13:19:26 +02:00