[Python-checkins] python/dist/src/Lib pydoc.py,1.74,1.75
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Thu, 06 Feb 2003 17:53:50 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv20760/Lib
Modified Files:
pydoc.py
Log Message:
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.
Index: pydoc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** pydoc.py 28 Dec 2002 09:23:08 -0000 1.74
--- pydoc.py 7 Feb 2003 01:53:46 -0000 1.75
***************
*** 1230,1235 ****
"""Page through text by invoking a program on a temporary file."""
import tempfile
! (fd, filename) = tempfile.mkstemp()
! file = os.fdopen(fd, 'w')
file.write(text)
file.close()
--- 1230,1235 ----
"""Page through text by invoking a program on a temporary file."""
import tempfile
! filename = tempfile.mktemp()
! file = open(filename, 'w')
file.write(text)
file.close()