pythonフォルダの次のレベルフォルダを読み込む


def traversalDir_FirstDir(path):

    list = []
    if (os.path.exists(path)):
        files = os.listdir(path)
        for file in files:
            m = os.path.join(path,file)
            print m
            if (os.path.isdir(m)):
                h = os.path.split(m)
                print h[1]
                list.append(h[1])
        print list

traversalDir_FirstDir("E:\\threatbook\\reports")