def tree(path):
    'Print path, similar to the the `tree` command.'
    print_path(path)
    for (dirpath, dirnames, filenames) in os.walk(path):
        for dirname in dirnames:
            print_path(os.path.join(dirpath, dirname))
        for filename in filenames:
            print_path(os.path.join(dirpath, filename))
Print path, similar to the the `tree` command.
def tree(path):
    
    print_path(path)
    for (dirpath, dirnames, filenames) in os.walk(path):
        for dirname in dirnames:
            print_path(os.path.join(dirpath, dirname))
        for filename in filenames:
            print_path(os.path.join(dirpath, filename))