python: Share generated methods between objects. justus/pyme3
authorJustus Winter <justus@gnupg.org>
Thu, 12 May 2016 16:29:04 +0000 (18:29 +0200)
committerJustus Winter <justus@gnupg.org>
Thu, 12 May 2016 16:29:04 +0000 (18:29 +0200)
commit11314f0db6e57597e3f56351a86fdb36a7a17dd7
treecc5796aba6cbe95d7f2f80a09f07f7b8b1b3271e
parentc5d118b2a76e9528df780d11da9566ff7c22e4f5
python: Share generated methods between objects.

* lang/python/pyme/util.py (GpgmeWrapper.__getattr__): Monkey-patch
the class.
* lang/python/tests/t-wrapper.py: Demonstrate the sharing.

Signed-off-by: Justus Winter <justus@gnupg.org>
lang/python/pyme/util.py
lang/python/tests/t-wrapper.py