# HG changeset patch # User Jeff Hammel # Date 1375882396 25200 # Node ID 9b7f5e31b46559fa59d0bafa90daa46a09d57b47 # Parent 59e6c8115a97cbef195eaadc5308923fd4f09f2e python/tree.py diff -r 59e6c8115a97 -r 9b7f5e31b465 python/tree.py --- a/python/tree.py Tue Aug 06 23:08:42 2013 -0700 +++ b/python/tree.py Wed Aug 07 06:33:16 2013 -0700 @@ -68,6 +68,17 @@ class DirectoryTree(Tree): """directory structure as a tree""" + def __init__(self, directory): + self.directory = directory + self._return_type = os.path.abspath + + def children(self): + return os.listdir(self.directory) # -> self._return_type + +## Serializers + +# How to serialize a tree -> JSON? + ### def tree(directory,