#!/usr/bin/env python import sys import os chs = open("chapters").readlines() f = open("Contents.html","w") print >>f, """ SWIG Users Manual

SWIG Users Manual

""" f.close() num = 1 for c in chs: c = c.strip() print "Processing %s" % c if c: os.system("python makechap.py %s %d >> Contents.html" % (c,num)) num += 1 f = open("Contents.html","a") print >>f, """ """