]> granicus.if.org Git - python/commitdiff
Script to write MIF files from ref*.{book,doc}
authorGuido van Rossum <guido@python.org>
Wed, 27 Nov 1996 19:50:32 +0000 (19:50 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 27 Nov 1996 19:50:32 +0000 (19:50 +0000)
Doc/ref/makeMIFs.py [new file with mode: 0644]

diff --git a/Doc/ref/makeMIFs.py b/Doc/ref/makeMIFs.py
new file mode 100644 (file)
index 0000000..fcaa71b
--- /dev/null
@@ -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()