def walk_dn(start_dir, depth=<NUM_LIT:10>):
start_depth = len(os.path.split(start_dir))<EOL>end_depth = start_depth + depth<EOL>for root, subdirs, files in os.walk(start_dir):<EOL><INDENT>yield root, subdirs, files<EOL>if len(os.path.split(root)) >= end_depth:<EOL><INDENT>break<EOL><DEDENT><DEDENT>
Walk down a directory tree. Same as os.walk but allows for a depth limit
via depth argument