初学者,弱问一个

初学者,弱问一个

浏览本地文件夹的Tree要怎么做呀,还请各位指点,谢
listdir 递归?
import os

def showdir(path):
    for x in os.listdir(path):
        if os.path.isdir(path+"/"+x):
            showdir(path+"/"+x)
        else:
            print path+"/"+x

path = "e:"
showdir(path)
>>> os.listdir.__doc__
"listdir(path) -> list_of_strings\n\nReturn a list containing the names of the entries in the directory.\n\n\tpath: path of directory to list\n\nThe list is in arbitrary order.  It does not include the special\nentries '.' and '..' even if they are present in the directory."