[Python-checkins] python/dist/src/Lib/idlelib NEWS.txt, 1.61, 1.62 ScriptBinding.py, 1.30, 1.31

kbk@users.sourceforge.net kbk at users.sourceforge.net
Tue Aug 23 04:27:33 CEST 2005


Update of /cvsroot/python/python/dist/src/Lib/idlelib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30659

Modified Files:
	NEWS.txt ScriptBinding.py 
Log Message:
1. Mac line endings were incorrect when pasting code from some browsers
   when using X11 and the Fink distribution.  Python Bug 1263656.
2. Eliminate duplicated code in ScriptBinding.run_module_event()
Modified Files:
 	NEWS.txt ScriptBinding.py 


Index: NEWS.txt
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/NEWS.txt,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- NEWS.txt	19 Jun 2005 18:56:15 -0000	1.61
+++ NEWS.txt	23 Aug 2005 02:27:23 -0000	1.62
@@ -3,6 +3,9 @@
 
 *Release date: XX-XXX-2005*
 
+- Mac line endings were incorrect when pasting code from some browsers
+  when using X11 and the Fink distribution.  Python Bug 1263656.
+
 - <Enter> when cursor is on a previous command retrieves that command.  Instead
   of replacing the input line, the previous command is now appended to the
   input line. Indentation is preserved, and undo is enabled.

Index: ScriptBinding.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/ScriptBinding.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- ScriptBinding.py	12 Jun 2005 05:19:23 -0000	1.30
+++ ScriptBinding.py	23 Aug 2005 02:27:23 -0000	1.31
@@ -53,7 +53,7 @@
         self.flist = self.editwin.flist
         self.root = self.flist.root
 
-    def check_module_event(self, event):
+    def check_module_event(self, event=None):
         filename = self.getfilename()
         if not filename:
             return
@@ -87,6 +87,7 @@
         f.close()
         if '\r' in source:
             source = re.sub(r"\r\n", "\n", source)
+            source = re.sub(r"\r", "\n", source)
         if source and source[-1] != '\n':
             source = source + '\n'
         text = self.editwin.text
@@ -132,12 +133,7 @@
         add that directory to its sys.path if not already included.
 
         """
-        filename = self.getfilename()
-        if not filename:
-            return
-        if not self.tabnanny(filename):
-            return
-        code = self.checksyntax(filename)
+        code = self.check_module_event(event)
         if not code:
             return
         shell = self.shell



More information about the Python-checkins mailing list