有没有办法在Python中返回当前目录中所有子目录的列表?
我知道你可以用文件做到这一点,但我需要获取目录列表.
python directory subdirectory
我正在尝试编写一个简单的Python脚本,它将index.tpl复制到所有子目录中的index.html(除了少数例外).
我试图获取子目录列表而陷入困境.
python file
python ×2
directory ×1
file ×1
subdirectory ×1