Staging
v0.8.1
https://github.com/python/cpython
Raw File
Tip revision: 22cf34795534220f1bf47013e4a7f0a5502ba3fb authored by cvs2svn on 26 November 1997, 21:20:51 UTC
This commit was manufactured by cvs2svn to create tag 'r15b1'.
Tip revision: 22cf347
makeMIFs.py
#! /bin/env python

"""Script to write MIF files from ref.book and ref*.doc."""

import os
import glob
import string

def main():
    files = ['ref.book'] + glob.glob('ref*.doc')
    files.sort()
    print "Files:", string.join(files)
    print "Starting FrameMaker..."
    pipe = os.popen("fmbatch", 'w')
    for i in files:
	cmd = "Open %s\nSaveAs m %s %s.MIF\n" % (i, i, os.path.splitext(i)[0])
	print cmd
	pipe.write(cmd)
    pipe.write("Quit\n")
    sts = pipe.close()
    if sts:
	print "Exit status", hex(sts)
    else:
	print "Starting webmaker..."
	os.system('/depot/sundry/src/webmaker/webmaker-sparc/webmaker -c ref.wml -t "Python 1.5 Reference Manual" ref.MIF')

if __name__ == '__main__':
    main()
back to top