# -*- coding:utf-8 -*-

import os


def list_dirs(path):
    assert os.path.exists(path) and os.path.isdir(path)
    for dir_path, dir_names, _ in os.walk(path):
        for dir_name in dir_names:
            yield os.path.join(dir_path, dir_name)


def list_files(path):
    pass


def list_all(path):
    pass



@@ -269,20 +269,206 @@
 h):%0A    
-p
 ass
+ert os.path.exists(path) and os.path.isdir(path)%0A    for dir_path, _, file_names in os.walk(path):%0A        for file_name in file_names:%0A            yield os.path.join(dir_path, file_name)
 %0A%0A%0Adef l
@@ -492,9 +492,8 @@
   pass%0A%0A
-%0A

add list files