From 60fb5d5f1377f5a4af7e1e55b1ec83fed864153f Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 4 Dec 2020 13:53:34 +0100 Subject: python: Add find() to the Python API This a mapping of uhd::device::find() into uhd.find() on the Python side. The uhd::device is intentionally not mapped into Python (prefer MultiUSRP or RfnocGraph instead), so the namespace is moved up one level. Example: >>> import uhd >>> # Now print the device args for all found B200s: >>> for dev_args in uhd.find("type=b200")): print(dev_args.to_string()) --- host/python/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'host/python/CMakeLists.txt') diff --git a/host/python/CMakeLists.txt b/host/python/CMakeLists.txt index 1e9fefa43..234870c5f 100644 --- a/host/python/CMakeLists.txt +++ b/host/python/CMakeLists.txt @@ -32,6 +32,7 @@ execute_process( add_library(pyuhd SHARED pyuhd.cpp ${CMAKE_SOURCE_DIR}/lib/property_tree_python.cpp + ${CMAKE_SOURCE_DIR}/lib/device_python.cpp ${CMAKE_SOURCE_DIR}/lib/usrp/multi_usrp_python.cpp ) # python expects extension modules with a particular suffix -- cgit v1.2.3