aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--examples/check_version.py7
-rw-r--r--examples/list_cameras.py12
-rw-r--r--tests/__init__.py0
4 files changed, 21 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 692ad13..8448e35 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,3 +37,5 @@ nosetests.xml
# PyCharm
.idea/
.cache/
+
+venv* \ No newline at end of file
diff --git a/examples/check_version.py b/examples/check_version.py
new file mode 100644
index 0000000..de8449c
--- /dev/null
+++ b/examples/check_version.py
@@ -0,0 +1,7 @@
+from pymba.vimba import Vimba
+
+
+if __name__ == '__main__':
+
+ vmb = Vimba()
+ print(vmb.version)
diff --git a/examples/list_cameras.py b/examples/list_cameras.py
new file mode 100644
index 0000000..0be2e12
--- /dev/null
+++ b/examples/list_cameras.py
@@ -0,0 +1,12 @@
+from pymba.vimba import Vimba
+from time import sleep
+
+
+if __name__ == '__main__':
+
+ with Vimba() as vmb:
+ # required for discovering GigE cameras
+ if vmb.system.GeVTLIsPresent:
+ vmb.system.runFeatureCommand("GeVDiscoveryAllOnce")
+ sleep(0.2)
+ print(vmb.camera_ids)
diff --git a/tests/__init__.py b/tests/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/tests/__init__.py
+++ /dev/null