aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authormorefigs <morefigs@gmail.com>2013-04-02 15:15:04 +1200
committermorefigs <morefigs@gmail.com>2013-04-02 15:15:04 +1200
commit1b5055c07553d18e6f241d848423d8e79691edbb (patch)
treeefa69134f953cdbfb7f6681c08ce961980306467 /README.md
parent72f90fff54b9e2cc1cb7aa21a8088f09a84fff04 (diff)
downloadpymba-1b5055c07553d18e6f241d848423d8e79691edbb.tar.gz
pymba-1b5055c07553d18e6f241d848423d8e79691edbb.zip
Update README.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md19
1 files changed, 18 insertions, 1 deletions
diff --git a/README.md b/README.md
index ed66728..2287097 100644
--- a/README.md
+++ b/README.md
@@ -4,10 +4,13 @@ pymba is a Python wrapper for the Allied Vision Technologies (AVT) Vimba C API.
## Usage
+### Typical usage
+
+The following code gives a good example of basic pymba usage. For clarity exceptions are not dealt with.
+
from pymba.Vimba import Vimba
from pymba.VimbaFrame import VimbaFrame
from pymba.VimbaCamera import VimbaCamera
- from pymba.VimbaException import VimbaException
# start Vimba
vimba = Vimba()
@@ -76,3 +79,17 @@ pymba is a Python wrapper for the Allied Vision Technologies (AVT) Vimba C API.
# shutdown Vimba
vimba.shutdown()
+
+
+### Handling Vimba exceptions
+
+Handling exceptions can be done as shown below.
+
+ from pymba.Vimba import Vimba
+ from pymba.VimbaException import VimbaException
+
+ try:
+ vimba = Vimba()
+ vimba.startup()
+ except VimbaException as e:
+ print e.message