Advertisement
otorp2

Loop through all nodes

Jan 11th, 2016
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. func getallnodes(node):
  2. for N in node.get_children():
  3. if N.get_child_count() > 0:
  4. print("["+N.get_name()+"]")
  5. getallnodes(N)
  6. else:
  7. # Do something
  8. print("- "+N.get_name())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement