[Python-checkins] r65535 - sandbox/trunk/ttk-gsoc/src/idlelib/PyShell.py

guilherme.polo python-checkins at python.org
Tue Aug 5 00:54:28 CEST 2008


Author: guilherme.polo
Date: Tue Aug  5 00:54:28 2008
New Revision: 65535

Log:
ranges[i] may be a textindex (Tcl Object), convert it to its string representation before continuing

Modified:
   sandbox/trunk/ttk-gsoc/src/idlelib/PyShell.py

Modified: sandbox/trunk/ttk-gsoc/src/idlelib/PyShell.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/src/idlelib/PyShell.py	(original)
+++ sandbox/trunk/ttk-gsoc/src/idlelib/PyShell.py	Tue Aug  5 00:54:28 2008
@@ -263,8 +263,8 @@
     def ranges_to_linenumbers(self, ranges):
         lines = []
         for index in range(0, len(ranges), 2):
-            lineno = int(float(ranges[index]))
-            end = int(float(ranges[index+1]))
+            lineno = int(float(str(ranges[index])))
+            end = int(float(str(ranges[index+1])))
             while lineno < end:
                 lines.append(lineno)
                 lineno += 1


More information about the Python-checkins mailing list