summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-12-24 18:31:53 (GMT)
committerGuido van Rossum <guido@python.org>1997-12-24 18:31:53 (GMT)
commitb9973d9060d6c7968118046e8658a54c264ea76b (patch)
treec6bbb8b20d6847d9077acc62f0b692b8827da256 /Doc
parent44a8931cafee6ade668028253e8cd3cf56c9442e (diff)
downloadcpython-b9973d9060d6c7968118046e8658a54c264ea76b.zip
cpython-b9973d9060d6c7968118046e8658a54c264ea76b.tar.gz
cpython-b9973d9060d6c7968118046e8658a54c264ea76b.tar.bz2
Script to edit one line in the PS to allow A4 printing.
Diffstat (limited to 'Doc')
-rwxr-xr-xDoc/ref/fixps.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/Doc/ref/fixps.py b/Doc/ref/fixps.py
new file mode 100755
index 0000000..4b32184
--- /dev/null
+++ b/Doc/ref/fixps.py
@@ -0,0 +1,26 @@
+#! /usr/bin/env python
+
+"""Dumb script to edit a particular line in the PostScript.
+
+This makes it possible to print on A4 paper.
+"""
+
+f = open("ref.ps", "r")
+
+lines = f.readlines()
+f.close()
+didit = 0
+
+for i in range(100):
+ if lines[i] == '/FMAllowPaperSizeMismatch false def\n':
+ lines[i] = '/FMAllowPaperSizeMismatch true def\n'
+ didit = 1
+ break
+
+if not didit:
+ print "ref.ps not changed"
+else:
+ print "rewriting edited ref.ps"
+ f = open("ref.ps", "w")
+ f.writelines(lines)
+ f.close()