bindings: python: add support for controlled execution
authorBartosz Golaszewski <bartekgola@gmail.com>
Wed, 16 May 2018 10:18:40 +0000 (12:18 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Wed, 16 May 2018 10:29:17 +0000 (12:29 +0200)
commit2dfb43260a8d785282f2dd94c6f5bd9091a84fd3
tree537fb08a50faae9a8081e8a27d3b8a408cb6ec0f
parente04d4d45c200e0e1277ca1c74e0f7f56d700b9c9
bindings: python: add support for controlled execution

Provide __enter__ and __exit__ callbacks for Chip so that it can be
used with the 'with' statement.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
bindings/python/examples/gpiod_tests.py
bindings/python/gpiodmodule.c