Merged revisions 79576-79578 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79576 | florent.xicluna | 2010-04-02 10:24:52 +0300 (Fri, 02 Apr 2010) | 2 lines
#7092: Fix additional "-3" warnings in the idlelib package, and convert to absolute imports.
........
r79577 | florent.xicluna | 2010-04-02 11:15:26 +0300 (Fri, 02 Apr 2010) | 2 lines
#7092: Drop the cmp argument.
........
r79578 | florent.xicluna | 2010-04-02 11:30:21 +0300 (Fri, 02 Apr 2010) | 2 lines
#7092: silence some py3k warnings
........
diff --git a/Lib/idlelib/TreeWidget.py b/Lib/idlelib/TreeWidget.py
index 5299e0e..7d962fe 100644
--- a/Lib/idlelib/TreeWidget.py
+++ b/Lib/idlelib/TreeWidget.py
@@ -18,8 +18,8 @@
from Tkinter import *
import imp
-import ZoomHeight
-from configHandler import idleConf
+from idlelib import ZoomHeight
+from idlelib.configHandler import idleConf
ICONDIR = "Icons"
@@ -397,7 +397,7 @@
names = os.listdir(self.path)
except os.error:
return []
- names.sort(lambda a, b: cmp(os.path.normcase(a), os.path.normcase(b)))
+ names.sort(key = os.path.normcase)
sublist = []
for name in names:
item = FileTreeItem(os.path.join(self.path, name))
@@ -452,7 +452,7 @@
# Testing functions
def test():
- import PyShell
+ from idlelib import PyShell
root = Toplevel(PyShell.root)
root.configure(bd=0, bg="yellow")
root.focus_set()