Comment 2 for bug 1241323

Revision history for this message
Martin Pitt (pitti) wrote :

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.