From 550e4e558367e0460a89fc4d253e491661a35b78 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Fri, 7 Feb 2003 01:53:46 +0000 Subject: [PATCH] SF bug 666444: 'help' makes linefeed only under Win32. Reverting one of those irritating "security fixes". fdopen() opens files in binary mode. That makes pydoc skip the \r\n on Windows that's need to make the output readable in the shell. Screw it. --- Lib/pydoc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 9179721c71d..9e55a896878 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -1229,8 +1229,8 @@ def pipepager(text, cmd): def tempfilepager(text, cmd): """Page through text by invoking a program on a temporary file.""" import tempfile - (fd, filename) = tempfile.mkstemp() - file = os.fdopen(fd, 'w') + filename = tempfile.mktemp() + file = open(filename, 'w') file.write(text) file.close() try: