From bbcab1ac0343942318d9ad2a713d2ac9770e40db Mon Sep 17 00:00:00 2001 From: morefigs Date: Thu, 29 Jan 2015 15:21:14 +1100 Subject: Added non context manager example --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3