Script to write MIF files from ref*.{book,doc}

This commit is contained in:
Guido van Rossum 1996-11-27 19:50:32 +00:00
parent 58a7856961
commit 558c09e4c1
1 changed files with 17 additions and 0 deletions

17
Doc/ref/makeMIFs.py Normal file
View File

@ -0,0 +1,17 @@
#! /bin/env python
"""Script to write MIF files from ref.book and ref*.doc."""
import os
import glob
def main():
pipe = os.popen("fmbatch", 'w')
for i in ['ref.book'] + glob.glob('ref*.doc'):
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")
if __name__ == '__main__':
main()