diff options
| author | morefigs <morefigs@gmail.com> | 2019-01-30 13:59:01 +1100 |
|---|---|---|
| committer | morefigs <morefigs@gmail.com> | 2019-01-30 13:59:01 +1100 |
| commit | 01587d8ba4d5a1f8371f44e719eda6547d3ed459 (patch) | |
| tree | 76fc58dedcb8b4aec9dd3c260ddd7badbd3e7fd7 /examples/camera/write_feature_value.py | |
| parent | 837d3af93e55b3a2714832092e1581df51cef1ec (diff) | |
| download | pymba-01587d8ba4d5a1f8371f44e719eda6547d3ed459.tar.gz pymba-01587d8ba4d5a1f8371f44e719eda6547d3ed459.zip | |
clean up examples into separate dirs
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() |
