@@ -0,0 +1,371 @@
+import os%0A%0Adef pathTraversal(pathName):%0A    for dirPath, dirNames, fileNames in os.walk(pathName):%0A        for fileName in fileNames:%0A            # if os.path.splitext(fileName)%5B1%5D == '.txt':%0A            filePath = os.path.join(dirPath, fileName)%0A            print filePath%0A%0Aif __name__ == '__main__':%0A    pathName = raw_input('input path: ')%0A    pathTraversal(pathName)%0A

add python path traversal demo