diff options
Diffstat (limited to 'examples/camera/write_feature_value.py')
| -rw-r--r-- | examples/camera/write_feature_value.py | 22 |
1 files changed, 22 insertions, 0 deletions
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() |
