Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utilities to traverse the i3 tree #66

Closed
rafaelleru opened this issue Sep 11, 2017 · 1 comment
Closed

Utilities to traverse the i3 tree #66

rafaelleru opened this issue Sep 11, 2017 · 1 comment

Comments

@rafaelleru
Copy link

No description provided.

@acrisci
Copy link
Member

acrisci commented Sep 11, 2017

What comes to mind immediately is breadth first traversal with some kind of generator thing:

root = i3ipc.Connection().get_tree()
for con in root:
    pass

Which is a bit more efficient and sugary way to iterate over the array given by con.descendents().

Using this internally in the library for searches would also be a big efficiency win.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants