1 from __future__ import with_statement
5 print "Usage: " + sys.argv[0] + " [hhc index file] [output file]"
14 section_start = re.compile(r"<LI>.*? value=\"((File List)|(Data Structures)|(Main Page)|(Directory Hierarchy))\".*$")
19 with open(sys.argv[1], "r") as f:
20 with open(outfile, "w+") as out:
22 if re.search(section_start, line):
23 if line.find("Data Structures") != -1:
26 elif line.find("File List") != -1:
34 data_structures.append(line)
37 elif re.search(r"^<\/UL>$", line):
38 for i in data_structures: