python: Add Session.open_device().

This commit is contained in:
Uwe Hermann 2013-04-25 00:15:49 +02:00
parent 57dd5e63ec
commit 0e77b7cab3
1 changed files with 3 additions and 0 deletions

View File

@ -197,6 +197,9 @@ class Session(object):
def add_device(self, device):
check(sr_session_dev_add(device.struct))
def open_device(self, device):
check(sr_dev_open(device.struct))
def add_callback(self, callback):
wrapper = partial(callback_wrapper, self, callback)
check(sr_session_datafeed_python_callback_add(wrapper))