diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-02-07 01:53:46 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-02-07 01:53:46 (GMT) |
commit | 550e4e558367e0460a89fc4d253e491661a35b78 (patch) | |
tree | 6a72eb081c2d5aa1f54e2e91a394774e8d4a1e20 /Lib/pydoc.py | |
parent | 658375b833e9c3224a97c4b90a08fd615c84c267 (diff) | |
download | cpython-550e4e558367e0460a89fc4d253e491661a35b78.zip cpython-550e4e558367e0460a89fc4d253e491661a35b78.tar.gz cpython-550e4e558367e0460a89fc4d253e491661a35b78.tar.bz2 |
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.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 9179721..9e55a89 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: |