summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/TreeWidget.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/TreeWidget.py')
-rw-r--r--Lib/idlelib/TreeWidget.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/idlelib/TreeWidget.py b/Lib/idlelib/TreeWidget.py
index c5c171f..7d962fe 100644
--- a/Lib/idlelib/TreeWidget.py
+++ b/Lib/idlelib/TreeWidget.py
@@ -15,12 +15,11 @@
# - optimize tree redraw after expand of subnode
import os
-import sys
from Tkinter import *
import imp
-import ZoomHeight
-from configHandler import idleConf
+from idlelib import ZoomHeight
+from idlelib.configHandler import idleConf
ICONDIR = "Icons"
@@ -398,7 +397,7 @@ class FileTreeItem(TreeItem):
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))
@@ -453,7 +452,7 @@ class ScrolledCanvas:
# Testing functions
def test():
- import PyShell
+ from idlelib import PyShell
root = Toplevel(PyShell.root)
root.configure(bd=0, bg="yellow")
root.focus_set()