[Python-checkins] python/dist/src/Tools/scripts diff.py, 1.4, 1.5 ndiff.py, 1.13, 1.14

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Sun Oct 3 21:03:22 CEST 2004


Update of /cvsroot/python/python/dist/src/Tools/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3376/Tools/scripts

Modified Files:
	diff.py ndiff.py 
Log Message:
Read the text files to be compared in universal-newline mode.


Index: diff.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/diff.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- diff.py	29 Aug 2004 16:34:40 -0000	1.4
+++ diff.py	3 Oct 2004 19:03:19 -0000	1.5
@@ -31,8 +31,8 @@
 
     fromdate = time.ctime(os.stat(fromfile).st_mtime)
     todate = time.ctime(os.stat(tofile).st_mtime)
-    fromlines = open(fromfile).readlines()
-    tolines = open(tofile).readlines()
+    fromlines = open(fromfile, 'U').readlines()
+    tolines = open(tofile, 'U').readlines()
 
     if options.u:
         diff = difflib.unified_diff(fromlines, tolines, fromfile, tofile, fromdate, todate, n=n)

Index: ndiff.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/ndiff.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- ndiff.py	13 May 2003 17:56:07 -0000	1.13
+++ ndiff.py	3 Oct 2004 19:03:19 -0000	1.14
@@ -60,7 +60,7 @@
 # couldn't be opened
 def fopen(fname):
     try:
-        return open(fname, 'r')
+        return open(fname, 'U')
     except IOError, detail:
         return fail("couldn't open " + fname + ": " + str(detail))
 



More information about the Python-checkins mailing list