diff options
| -rw-r--r-- | README.md | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -21,7 +21,7 @@ Checking the version using a context manager: from pymba import * with Vimba() as vimba: - print vimba.getVersion() + print(vimba.getVersion()) Or without using a context manager: @@ -29,7 +29,7 @@ Or without using a context manager: vimba = Vimba() vimba.startup() - print vimba.getVersion() + print(vimba.getVersion()) vimba.shutdown() ### Interacting with cameras @@ -50,7 +50,7 @@ Discover, open, manipulate, and capture frames from a camera. time.sleep(0.2) cameraIds = vimba.getCameraIds() for cameraId in cameraIds: - print 'Camera ID:', cameraId + print(cameraId) # get and open a camera camera0 = vimba.getCamera(cameraIds[0]) @@ -59,10 +59,10 @@ Discover, open, manipulate, and capture frames from a camera. # list camera features cameraFeatureNames = camera0.getFeatureNames() for name in cameraFeatureNames: - print 'Camera feature:', name + print(name) # get the value of a feature - print camera0.AcquisitionMode + print(camera0.AcquisitionMode) # set the value of a feature camera0.AcquisitionMode = 'SingleFrame' @@ -110,7 +110,7 @@ Get a reference to the Vimba system object and list available system features. # list system features for featureName in system.getFeatureNames(): - print 'System feature:', featureName + print(featureName) ### Interacting with transport layer interfaces @@ -122,7 +122,7 @@ Get a reference to an interface object and list available interface features. # get list of available interfaces interfaceIds = vimba.getInterfaceIds() for interfaceId in interfaceIds: - print 'Interface ID:', interfaceId + print(interfaceId) # get interface object and open it interface0 = vimba.getInterface(interfaceIds[0]) @@ -131,7 +131,7 @@ Get a reference to an interface object and list available interface features. # list interface features interfaceFeatureNames = interface0.getFeatureNames() for name in interfaceFeatureNames: - print 'Interface feature:', name + print(name) # close interface interface0.closeInterface() @@ -145,7 +145,7 @@ Get a reference to an interface object and list available interface features. try: with Vimba() as vimba: except VimbaException as e: - print e.message + print(e.message) |
