[Python-checkins] python/dist/src/Lib linecache.py,1.8,1.9 py_compile.py,1.18,1.19
jackjansen@sourceforge.net
jackjansen@sourceforge.net
Sun, 14 Apr 2002 13:12:42 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv1748/Lib
Modified Files:
linecache.py py_compile.py
Log Message:
Mass checkin of universal newline support.
Highlights: import and friends will understand any of \r, \n and \r\n
as end of line. Python file input will do the same if you use mode 'U'.
Everything can be disabled by configuring with --without-universal-newlines.
See PEP278 for details.
Index: linecache.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/linecache.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** linecache.py 29 May 2001 04:27:01 -0000 1.8
--- linecache.py 14 Apr 2002 20:12:39 -0000 1.9
***************
*** 91,95 ****
return []
try:
! fp = open(fullname, 'r')
lines = fp.readlines()
fp.close()
--- 91,95 ----
return []
try:
! fp = open(fullname, 'rU')
lines = fp.readlines()
fp.close()
Index: py_compile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/py_compile.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** py_compile.py 12 Feb 2001 02:00:42 -0000 1.18
--- py_compile.py 14 Apr 2002 20:12:40 -0000 1.19
***************
*** 45,49 ****
"""
import os, marshal, __builtin__
! f = open(file)
try:
timestamp = long(os.fstat(f.fileno())[8])
--- 45,49 ----
"""
import os, marshal, __builtin__
! f = open(file, 'U')
try:
timestamp = long(os.fstat(f.fileno())[8])