[Python-checkins] python/dist/src/Lib/idlelib IdleHistory.py, 1.5, 1.6 PyShell.py, 1.97, 1.98

kbk@users.sourceforge.net kbk at users.sourceforge.net
Tue Jun 21 04:42:19 CEST 2005


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

Modified Files:
	IdleHistory.py PyShell.py 
Log Message:
Remove dead code
M IdleHistory.py
M PyShell.py


Index: IdleHistory.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/IdleHistory.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- IdleHistory.py	3 Feb 2005 01:37:13 -0000	1.5
+++ IdleHistory.py	21 Jun 2005 02:42:17 -0000	1.6
@@ -86,11 +86,3 @@
             self.history.append(source)
         self.history_pointer = None
         self.history_prefix = None
-
-    def recall(self, s):
-        s = s.strip()
-        self.text.tag_remove("sel", "1.0", "end")
-        self.text.delete("iomark", "end-1c")
-        self.text.mark_set("insert", "end-1c")
-        self.text.insert("insert", s)
-        self.text.see("insert")

Index: PyShell.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/PyShell.py,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -d -r1.97 -r1.98
--- PyShell.py	19 Jun 2005 18:56:15 -0000	1.97
+++ PyShell.py	21 Jun 2005 02:42:17 -0000	1.98
@@ -1134,19 +1134,15 @@
             self.text.mark_set("insert", "end-1c")
             s = s.strip()
             lines = s.split('\n')
-            if lines:
-                prefix = self.text.get("insert linestart","insert").rstrip()
-                if prefix and prefix[-1]==':':
-                    self.newline_and_indent_event(event)
-
-                self.text.insert("insert",lines[0].strip())
-                if len(lines) > 1:
+            prefix = self.text.get("insert linestart","insert").rstrip()
+            if prefix and prefix[-1]==':':
+                self.newline_and_indent_event(event)
+            self.text.insert("insert",lines[0].strip())
+            if len(lines) > 1:
+                self.newline_and_indent_event(event)
+                for line in lines[1:]:
+                    self.text.insert("insert", line.strip())
                     self.newline_and_indent_event(event)
-                    for line in lines[1:]:
-                        self.text.insert("insert", line.strip())
-                        self.newline_and_indent_event(event)
-            else:
-                self.text.insert("insert", s)
         finally:
             self.text.see("insert")
             self.text.undo_block_stop()



More information about the Python-checkins mailing list