Browse Source

Implemented connections_between in wrapper

Yentl Van Tendeloo 8 years ago
parent
commit
37f0b937a9
1 changed files with 8 additions and 1 deletions
  1. 8 1
      wrappers/modelverse.py

+ 8 - 1
wrappers/modelverse.py

@@ -917,7 +917,14 @@ def element_list_nice(model_name):
 
 def connections_between(model_name, source_element, target_element):
     """Gets a list of all allowed connections between the source and target element in the model."""
-    raise NotImplementedError()
+    _goto_mode(MODE_MODIFY, model_name)
+
+    _input(["connections_between", source_element, target_element])
+    output = _handle_output("Success: ", split=" ")
+    if output == "":
+        return set([])
+    else:
+        return set(output.split("\n"))
 
 def define_attribute(model_name, node, attr_name, attr_type):
     """Create a new attribute, which can be instantiated one meta-level below."""