mirror of
https://github.com/python/cpython.git
synced 2025-09-17 22:20:23 +00:00
#7092: Fix additional "-3" warnings in the idlelib package, and convert to absolute imports.
This commit is contained in:
parent
f28dd0d1bf
commit
d630c04ab1
37 changed files with 169 additions and 149 deletions
|
@ -18,8 +18,8 @@ import os
|
|||
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 @@ 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))
|
||||
|
@ -452,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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue