Commit 50a87715 authored by Olivier Aubert's avatar Olivier Aubert

bindings/mediacontrol-python/vlcwrapper.py: make the tree() method return a...

bindings/mediacontrol-python/vlcwrapper.py: make the tree() method return a string rather than print it.
parent efed5df6
...@@ -29,11 +29,11 @@ class VLCObject(object): ...@@ -29,11 +29,11 @@ class VLCObject(object):
def tree(self, prefix=" "): def tree(self, prefix=" "):
"""Displays all children as a tree of VLCObject """Displays all children as a tree of VLCObject
""" """
print prefix, self res=prefix + str(self) + "\n"
for i in self._o.children(): for i in self._o.children():
t=VLCObject(i) t=VLCObject(i)
t.tree(prefix=prefix + " ") res += t.tree(prefix=prefix + " ")
return return res
def __getattribute__(self, attr): def __getattribute__(self, attr):
"""Converts attribute access to access to variables. """Converts attribute access to access to variables.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment