directory-traversal

Python os.walk + follow symlinks

Python os.walk + follow symlinks Question: How do I get this piece to follow symlinks in python 2.6? def load_recursive(self, path): for subdir, dirs, files in os.walk(path): for file in files: if file.endswith(‘.xml’): file_path = os.path.join(subdir, file) try: do_stuff(file_path) except: continue Asked By: fmalina || Source Answers: Set followlinks to True. This is the fourth …

Total answers: 1