#!/usr/bin/python python
"""Traverse filespec of *.html looking for select tag and write out report of options."""
import os
import sys
from xml.sax.saxutils import escape
def process(filename, fp):
print "* Processing:", filename, "\n"
# parse the file
select_of_htmlFile = open(filename)
fp.write("
Filename: " + filename + "
\n")
prefix = "
"
inSelect = 0
line = select_of_htmlFile.readline( )
while line:
line = " " + line.strip( )
if line.find("
\n")
inSelect = 1
if line.find("id=") > 0:
v = line.index("id=")
dm = line[(v+3):(v+4)]
v2 = line[(v+4):].index(dm) + v + 4
fp.write("