lib/plugin/plugin.c: do not use G_MODULE_BIND_LOCAL for Python plugin provider
[babeltrace.git] / bindings / python / bt2 / plugin.py
index 1f71c126b833a9bb638140926c14a38262bad143..920eb63642d71502868c3cc3becbe69e3c41e3af 100644 (file)
@@ -56,6 +56,16 @@ def create_plugins_from_dir(path, recurse=True):
     return _plugin_ptrs_to_plugins(plugin_ptrs)
 
 
+def create_plugin_from_name(name):
+    utils._check_str(name)
+    plugin_ptr = native_bt.plugin_create_from_name(name)
+
+    if plugin_ptr is None:
+        raise bt2.NoSuchPluginError(name)
+
+    return _Plugin._create_from_ptr(plugin_ptr)
+
+
 class _PluginVersion:
     def __init__(self, major, minor, patch, extra):
         self._major = major
This page took 0.024088 seconds and 4 git commands to generate.