Skip to content

Instantly share code, notes, and snippets.

@ptrin
Created January 23, 2013 16:50
Show Gist options
  • Select an option

  • Save ptrin/4609708 to your computer and use it in GitHub Desktop.

Select an option

Save ptrin/4609708 to your computer and use it in GitHub Desktop.

Revisions

  1. ptrin renamed this gist Jan 23, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. ptrin created this gist Jan 23, 2013.
    17 changes: 17 additions & 0 deletions gistfile1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    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