bindings: python: examples: check if '__main__' is set
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Thu, 5 Sep 2019 15:00:24 +0000 (17:00 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 10 Sep 2019 08:43:24 +0000 (10:43 +0200)
commit8fc50f32cd9670f88ee9faa1ea5d97aa043599fa
treef52991b37fbb73be967c0a2a9b5f0134eb5a3913
parent5ef0c231e1aff095aeabf44f477e41c23a99d21c
bindings: python: examples: check if '__main__' is set

The examples are programs meant to be executed directly and not
imported. Use the standard "if __name__ == '__main__':" before
any code.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
bindings/python/examples/gpiodetect.py
bindings/python/examples/gpiofind.py
bindings/python/examples/gpioget.py
bindings/python/examples/gpioinfo.py
bindings/python/examples/gpiomon.py
bindings/python/examples/gpioset.py