where output defaults to sys.stdout (for None), but can be either a file name or a file object. For large trees it's convenient to do something like recursive_properties('/tmp/dump.txt'), for small trees stdout is fine. With maxdepth you can optionally limit the depth.
I'd appreciate some better ideas about the name; in my test case I just call it "dump()" usually, but this name is rather overloaded and ambiguous.
Yes, I was planning to do that. Something like
def write_property_ tree(self, output=None, maxdepth=None):
where output defaults to sys.stdout (for None), but can be either a file name or a file object. For large trees it's convenient to do something like recursive_ properties( '/tmp/dump. txt'), for small trees stdout is fine. With maxdepth you can optionally limit the depth.
I'd appreciate some better ideas about the name; in my test case I just call it "dump()" usually, but this name is rather overloaded and ambiguous.