Created
January 23, 2013 16:50
-
-
Save ptrin/4609708 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_file_list(dir=options.source_dir): | |
""" Returns list of all html files in specified directory (recursive) """ | |
fileList = [] | |
print dir | |
try: | |
for root, subFolders, files in os.walk(dir): | |
for file in files: | |
filepath = os.path.join(root,file) | |
if ".html" in filepath: | |
fileList.append(filepath) | |
print fileList | |
return fileList | |
except OSError as e: | |
print e.errno | |
print e.filename | |
print e.strerror |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment