From 01587d8ba4d5a1f8371f44e719eda6547d3ed459 Mon Sep 17 00:00:00 2001 From: morefigs Date: Wed, 30 Jan 2019 13:59:01 +1100 Subject: clean up examples into separate dirs --- examples/camera/write_feature_value.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 examples/camera/write_feature_value.py (limited to 'examples/camera/write_feature_value.py') diff --git a/examples/camera/write_feature_value.py b/examples/camera/write_feature_value.py new file mode 100644 index 0000000..77f8ce5 --- /dev/null +++ b/examples/camera/write_feature_value.py @@ -0,0 +1,22 @@ +from pymba import Vimba + + +if __name__ == '__main__': + + with Vimba() as vimba: + camera = vimba.camera(0) + camera.open() + + # read a feature value + feature = camera.feature('ExposureAuto') + value = feature.value + + # set the feature value + feature.value = value + + print(feature.name, '=', feature.value) + + # alternatively the feature value can be set as an object attribute + camera.ExposureAuto = feature.value + + camera.close() -- cgit v1.2.3