aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormorefigs <morefigs@gmail.com>2015-01-29 15:21:14 +1100
committermorefigs <morefigs@gmail.com>2015-01-29 15:21:14 +1100
commitbbcab1ac0343942318d9ad2a713d2ac9770e40db (patch)
treeb5637d78ab8c4b50032ce0c6e49e53e25aed1488
parent2ebdf4b27a6feb13f351f40cafc4a797560b28b2 (diff)
downloadpymba-bbcab1ac0343942318d9ad2a713d2ac9770e40db.tar.gz
pymba-bbcab1ac0343942318d9ad2a713d2ac9770e40db.zip
Added non context manager example
-rw-r--r--README.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/README.md b/README.md
index 4a8c484..886d6a9 100644
--- a/README.md
+++ b/README.md
@@ -14,13 +14,24 @@ Install pymba.
### Testing installation
-If Vimba and pymba are installed correctly, then the following code should give the installed Vimba version. No camera is needed.
+If Vimba and pymba are installed correctly, then the following code examples should give the installed Vimba version. No camera is needed.
+
+Checking the version using a context manager:
from pymba import *
with Vimba() as vimba:
print vimba.getVersion()
+Or without using a context manager:
+
+ from pymba import *
+
+ vimba = Vimba()
+ vimba.startup()
+ print vimba.getVersion()
+ vimba.shutdown()
+
### Interacting with cameras
Discover, open, manipulate, and capture frames from a camera.