Index: Lib/idlelib/AutoCompleteWindow.py =================================================================== --- Lib/idlelib/AutoCompleteWindow.py (revision 63374) +++ Lib/idlelib/AutoCompleteWindow.py (working copy) @@ -1,7 +1,7 @@ """ An auto-completion window for IDLE, used by the AutoComplete extension """ -from Tkinter import * +from tkinter import * from MultiCall import MC_SHIFT import AutoComplete Index: Lib/idlelib/ToolTip.py =================================================================== --- Lib/idlelib/ToolTip.py (revision 63374) +++ Lib/idlelib/ToolTip.py (working copy) @@ -3,7 +3,7 @@ # may be useful for some purposes in (or almost in ;) the current project scope # Ideas gleaned from PySol -from Tkinter import * +from tkinter import * class ToolTipBase: Index: Lib/idlelib/UndoDelegator.py =================================================================== --- Lib/idlelib/UndoDelegator.py (revision 63374) +++ Lib/idlelib/UndoDelegator.py (working copy) @@ -1,5 +1,5 @@ import string -from Tkinter import * +from tkinter import * from Delegator import Delegator #$ event <> Index: Lib/idlelib/ColorDelegator.py =================================================================== --- Lib/idlelib/ColorDelegator.py (revision 63374) +++ Lib/idlelib/ColorDelegator.py (working copy) @@ -2,7 +2,7 @@ import re import keyword import __builtin__ -from Tkinter import * +from tkinter import * from Delegator import Delegator from configHandler import idleConf Index: Lib/idlelib/ObjectBrowser.py =================================================================== --- Lib/idlelib/ObjectBrowser.py (revision 63374) +++ Lib/idlelib/ObjectBrowser.py (working copy) @@ -136,7 +136,7 @@ def _test(): import sys - from Tkinter import Tk + from tkinter import Tk root = Tk() root.configure(bd=0, bg="yellow") root.focus_set() Index: Lib/idlelib/configSectionNameDialog.py =================================================================== --- Lib/idlelib/configSectionNameDialog.py (revision 63374) +++ Lib/idlelib/configSectionNameDialog.py (working copy) @@ -2,8 +2,8 @@ Dialog that allows user to specify a new config file section name. Used to get new highlight theme and keybinding set names. """ -from Tkinter import * -import tkMessageBox +from tkinter import * +import tkinter.messagebox as tkMessageBox class GetCfgSectionNameDialog(Toplevel): def __init__(self,parent,title,message,usedNames): Index: Lib/idlelib/PyShell.py =================================================================== --- Lib/idlelib/PyShell.py (revision 63374) +++ Lib/idlelib/PyShell.py (working copy) @@ -17,12 +17,12 @@ from code import InteractiveInterpreter try: - from Tkinter import * + from tkinter import * except ImportError: - print>>sys.__stderr__, "** IDLE can't import Tkinter. " \ + print>>sys.__stderr__, "** IDLE can't import tkinter. " \ "Your Python may not be configured for Tk. **" sys.exit(1) -import tkMessageBox +import tkinter.messagebox as tkMessageBox from EditorWindow import EditorWindow, fixwordbreaks from FileList import FileList @@ -992,8 +992,8 @@ (sys.version, sys.platform, self.COPYRIGHT, self.firewallmessage, idlever.IDLE_VERSION, nosub)) self.showprompt() - import Tkinter - Tkinter._default_root = None # 03Jan04 KBK What's this? + import tkinter + tkinter._default_root = None # 03Jan04 KBK What's this? return True def readline(self): Index: Lib/idlelib/Debugger.py =================================================================== --- Lib/idlelib/Debugger.py (revision 63374) +++ Lib/idlelib/Debugger.py (working copy) @@ -1,7 +1,7 @@ import os import bdb import types -from Tkinter import * +from tkinter import * from WindowList import ListedToplevel from ScrolledList import ScrolledList import macosxSupport Index: Lib/idlelib/configDialog.py =================================================================== --- Lib/idlelib/configDialog.py (revision 63374) +++ Lib/idlelib/configDialog.py (working copy) @@ -9,8 +9,10 @@ Refer to comments in EditorWindow autoindent code for details. """ -from Tkinter import * -import tkMessageBox, tkColorChooser, tkFont +from tkinter import * +import tkinter.messagebox as tkMessageBox +import tkinter.colorchooser as tkColorChooser +import tkinter.font as tkFont import string from configHandler import idleConf Index: Lib/idlelib/StackViewer.py =================================================================== --- Lib/idlelib/StackViewer.py (revision 63374) +++ Lib/idlelib/StackViewer.py (working copy) @@ -7,7 +7,7 @@ def StackBrowser(root, flist=None, tb=None, top=None): if top is None: - from Tkinter import Toplevel + from tkinter import Toplevel top = Toplevel(root) sc = ScrolledCanvas(top, bg="white", highlightthickness=0) sc.frame.pack(expand=1, fill="both") @@ -128,7 +128,7 @@ reload(testcode) except: sys.last_type, sys.last_value, sys.last_traceback = sys.exc_info() - from Tkinter import Tk + from tkinter import Tk root = Tk() StackBrowser(None, top=root) root.mainloop() Index: Lib/idlelib/SearchEngine.py =================================================================== --- Lib/idlelib/SearchEngine.py (revision 63374) +++ Lib/idlelib/SearchEngine.py (working copy) @@ -1,6 +1,6 @@ import re -from Tkinter import * -import tkMessageBox +from tkinter import * +import tkinter.messagebox as tkMessageBox def get(root): if not hasattr(root, "_searchengine"): Index: Lib/idlelib/ReplaceDialog.py =================================================================== --- Lib/idlelib/ReplaceDialog.py (revision 63374) +++ Lib/idlelib/ReplaceDialog.py (working copy) @@ -1,4 +1,4 @@ -from Tkinter import * +from tkinter import * import SearchEngine from SearchDialogBase import SearchDialogBase Index: Lib/idlelib/ScriptBinding.py =================================================================== --- Lib/idlelib/ScriptBinding.py (revision 63374) +++ Lib/idlelib/ScriptBinding.py (working copy) @@ -22,7 +22,7 @@ import string import tabnanny import tokenize -import tkMessageBox +import tkinter.messagebox as tkMessageBox import PyShell from configHandler import idleConf Index: Lib/idlelib/tabbedpages.py =================================================================== --- Lib/idlelib/tabbedpages.py (revision 63374) +++ Lib/idlelib/tabbedpages.py (working copy) @@ -7,7 +7,7 @@ TabSet -- A widget containing tabs (buttons) in one or more rows. """ -from Tkinter import * +from tkinter import * class InvalidNameError(Exception): pass class AlreadyExistsError(Exception): pass Index: Lib/idlelib/keybindingDialog.py =================================================================== --- Lib/idlelib/keybindingDialog.py (revision 63374) +++ Lib/idlelib/keybindingDialog.py (working copy) @@ -1,8 +1,8 @@ """ Dialog for building Tkinter accelerator key bindings """ -from Tkinter import * -import tkMessageBox +from tkinter import * +import tkinter.messagebox as tkMessageBox import string class GetKeysDialog(Toplevel): Index: Lib/idlelib/configHelpSourceEdit.py =================================================================== --- Lib/idlelib/configHelpSourceEdit.py (revision 63374) +++ Lib/idlelib/configHelpSourceEdit.py (working copy) @@ -3,9 +3,9 @@ import os import sys -from Tkinter import * -import tkMessageBox -import tkFileDialog +from tkinter import * +import tkinter.messagebox as tkMessageBox +import tkinter.filedialog as tkFileDialog class GetHelpSourceDialog(Toplevel): def __init__(self, parent, title, menuItem='', filePath=''): Index: Lib/idlelib/WidgetRedirector.py =================================================================== --- Lib/idlelib/WidgetRedirector.py (revision 63374) +++ Lib/idlelib/WidgetRedirector.py (working copy) @@ -1,4 +1,4 @@ -from Tkinter import * +from tkinter import * class WidgetRedirector: Index: Lib/idlelib/GrepDialog.py =================================================================== --- Lib/idlelib/GrepDialog.py (revision 63374) +++ Lib/idlelib/GrepDialog.py (working copy) @@ -1,7 +1,7 @@ import os import fnmatch import sys -from Tkinter import * +from tkinter import * import SearchEngine from SearchDialogBase import SearchDialogBase Index: Lib/idlelib/EditorWindow.py =================================================================== --- Lib/idlelib/EditorWindow.py (revision 63374) +++ Lib/idlelib/EditorWindow.py (working copy) @@ -3,9 +3,9 @@ import re import imp from itertools import count -from Tkinter import * -import tkSimpleDialog -import tkMessageBox +from tkinter import * +import tkinter.simpledialog as tkSimpleDialog +import tkinter.messagebox as tkMessageBox from MultiCall import MultiCallCreator import webbrowser @@ -45,7 +45,7 @@ from UndoDelegator import UndoDelegator from IOBinding import IOBinding, filesystemencoding, encoding import Bindings - from Tkinter import Toplevel + from tkinter import Toplevel from MultiStatusBar import MultiStatusBar help_url = None Index: Lib/idlelib/OutputWindow.py =================================================================== --- Lib/idlelib/OutputWindow.py (revision 63374) +++ Lib/idlelib/OutputWindow.py (working copy) @@ -1,7 +1,7 @@ -from Tkinter import * +from tkinter import * from EditorWindow import EditorWindow import re -import tkMessageBox +import tkinter.messagebox as tkMessageBox import IOBinding class OutputWindow(EditorWindow): Index: Lib/idlelib/aboutDialog.py =================================================================== --- Lib/idlelib/aboutDialog.py (revision 63374) +++ Lib/idlelib/aboutDialog.py (working copy) @@ -2,7 +2,7 @@ """ -from Tkinter import * +from tkinter import * import os import os.path import textView Index: Lib/idlelib/IOBinding.py =================================================================== --- Lib/idlelib/IOBinding.py (revision 63374) +++ Lib/idlelib/IOBinding.py (working copy) @@ -10,11 +10,11 @@ import sys import codecs import tempfile -import tkFileDialog -import tkMessageBox +import tkinter.filedialog as tkFileDialog +import tkinter.messagebox as tkMessageBox import re -from Tkinter import * -from SimpleDialog import SimpleDialog +from tkinter import * +from tkinter.simpledialog import SimpleDialog from configHandler import idleConf Index: Lib/idlelib/ScrolledList.py =================================================================== --- Lib/idlelib/ScrolledList.py (revision 63374) +++ Lib/idlelib/ScrolledList.py (working copy) @@ -1,4 +1,4 @@ -from Tkinter import * +from tkinter import * class ScrolledList: Index: Lib/idlelib/WindowList.py =================================================================== --- Lib/idlelib/WindowList.py (revision 63374) +++ Lib/idlelib/WindowList.py (working copy) @@ -1,4 +1,4 @@ -from Tkinter import * +from tkinter import * class WindowList: Index: Lib/idlelib/FileList.py =================================================================== --- Lib/idlelib/FileList.py (revision 63374) +++ Lib/idlelib/FileList.py (working copy) @@ -1,6 +1,6 @@ import os -from Tkinter import * -import tkMessageBox +from tkinter import * +import tkinter.messagebox as tkMessageBox class FileList: Index: Lib/idlelib/textView.py =================================================================== --- Lib/idlelib/textView.py (revision 63374) +++ Lib/idlelib/textView.py (working copy) @@ -2,8 +2,8 @@ """ -from Tkinter import * -import tkMessageBox +from tkinter import * +import tkinter.messagebox as tkMessageBox class TextViewer(Toplevel): """A simple text viewer dialog for IDLE @@ -68,7 +68,7 @@ else: textFile = open(filename, 'r') except IOError: - import tkMessageBox + import tkinter.messagebox as tkMessageBox tkMessageBox.showerror(title='File Load Error', message='Unable to load file %r .' % filename, parent=parent) Index: Lib/idlelib/CodeContext.py =================================================================== --- Lib/idlelib/CodeContext.py (revision 63374) +++ Lib/idlelib/CodeContext.py (working copy) @@ -9,8 +9,8 @@ not open blocks are not shown in the context hints pane. """ -import Tkinter -from Tkconstants import TOP, LEFT, X, W, SUNKEN +import tkinter +from tkinter.constants import TOP, LEFT, X, W, SUNKEN from configHandler import idleConf import re from sys import maxint as INFINITY @@ -69,7 +69,7 @@ border = 0 for widget in widgets: border += int(str( widget.cget('border') )) - self.label = Tkinter.Label(self.editwin.top, + self.label = tkinter.Label(self.editwin.top, text="\n" * (self.context_depth - 1), anchor=W, justify=LEFT, font=self.textfont, Index: Lib/idlelib/CallTipWindow.py =================================================================== --- Lib/idlelib/CallTipWindow.py (revision 63374) +++ Lib/idlelib/CallTipWindow.py (working copy) @@ -4,7 +4,7 @@ Used by the CallTips IDLE extension. """ -from Tkinter import * +from tkinter import * HIDE_VIRTUAL_EVENT_NAME = "<>" HIDE_SEQUENCES = ("", "") Index: Lib/idlelib/SearchDialogBase.py =================================================================== --- Lib/idlelib/SearchDialogBase.py (revision 63374) +++ Lib/idlelib/SearchDialogBase.py (working copy) @@ -1,4 +1,4 @@ -from Tkinter import * +from tkinter import * class SearchDialogBase: Index: Lib/idlelib/SearchDialog.py =================================================================== --- Lib/idlelib/SearchDialog.py (revision 63374) +++ Lib/idlelib/SearchDialog.py (working copy) @@ -1,4 +1,4 @@ -from Tkinter import * +from tkinter import * import SearchEngine from SearchDialogBase import SearchDialogBase Index: Lib/idlelib/TreeWidget.py =================================================================== --- Lib/idlelib/TreeWidget.py (revision 63374) +++ Lib/idlelib/TreeWidget.py (working copy) @@ -15,7 +15,7 @@ # - optimize tree redraw after expand of subnode import os -from Tkinter import * +from tkinter import * import imp import ZoomHeight Index: Lib/idlelib/run.py =================================================================== --- Lib/idlelib/run.py (revision 63374) +++ Lib/idlelib/run.py (working copy) @@ -127,9 +127,9 @@ server.handle_request() # A single request only def show_socket_error(err, address): - import Tkinter - import tkMessageBox - root = Tkinter.Tk() + import tkinter + import tkinter.messagebox as tkMessageBox + root = tkinter.Tk() root.withdraw() if err[0] == 61: # connection refused msg = "IDLE's subprocess can't connect to %s:%d. This may be due "\ Index: Lib/idlelib/Percolator.py =================================================================== --- Lib/idlelib/Percolator.py (revision 63374) +++ Lib/idlelib/Percolator.py (working copy) @@ -81,5 +81,5 @@ root.mainloop() if __name__ == "__main__": - from Tkinter import * + from tkinter import * main() Index: Lib/idlelib/dynOptionMenuWidget.py =================================================================== --- Lib/idlelib/dynOptionMenuWidget.py (revision 63374) +++ Lib/idlelib/dynOptionMenuWidget.py (working copy) @@ -2,8 +2,8 @@ OptionMenu widget modified to allow dynamic menu reconfiguration and setting of highlightthickness """ -from Tkinter import OptionMenu -from Tkinter import _setit +from tkinter import OptionMenu +from tkinter import _setit import copy class DynOptionMenu(OptionMenu): Index: Lib/idlelib/MultiStatusBar.py =================================================================== --- Lib/idlelib/MultiStatusBar.py (revision 63374) +++ Lib/idlelib/MultiStatusBar.py (working copy) @@ -1,4 +1,4 @@ -from Tkinter import * +from tkinter import * class MultiStatusBar(Frame): Index: Lib/idlelib/MultiCall.py =================================================================== --- Lib/idlelib/MultiCall.py (revision 63374) +++ Lib/idlelib/MultiCall.py (working copy) @@ -32,7 +32,7 @@ import sys import string import re -import Tkinter +import tkinter # the event type constants, which define the meaning of mc_type MC_KEYPRESS=0; MC_KEYRELEASE=1; MC_BUTTONPRESS=2; MC_BUTTONRELEASE=3; @@ -292,7 +292,7 @@ return _multicall_dict[widget] class MultiCall (widget): - assert issubclass(widget, Tkinter.Misc) + assert issubclass(widget, tkinter.Misc) def __init__(self, *args, **kwargs): apply(widget.__init__, (self,)+args, kwargs) @@ -382,8 +382,8 @@ if __name__ == "__main__": # Test - root = Tkinter.Tk() - text = MultiCallCreator(Tkinter.Text)(root) + root = tkinter.Tk() + text = MultiCallCreator(tkinter.Text)(root) text.pack() def bindseq(seq, n=[0]): def handler(event): Index: Lib/idlelib/macosxSupport.py =================================================================== --- Lib/idlelib/macosxSupport.py (revision 63374) +++ Lib/idlelib/macosxSupport.py (working copy) @@ -3,7 +3,7 @@ GUI application (as opposed to an X11 application). """ import sys -import Tkinter +import tkinter def runningAsOSXApp(): """ Returns True iff running from the IDLE.app bundle on OSX """ @@ -26,7 +26,7 @@ def hideTkConsole(root): try: root.tk.call('console', 'hide') - except Tkinter.TclError: + except tkinter.TclError: # Some versions of the Tk framework don't have a console object pass @@ -46,7 +46,7 @@ # # Due to a (mis-)feature of TkAqua the user will also see an empty Help # menu. - from Tkinter import Menu, Text, Text + from tkinter import Menu, Text, Text from EditorWindow import prepstr, get_accelerator import Bindings import WindowList Index: Lib/pydoc.py =================================================================== --- Lib/pydoc.py (revision 63374) +++ Lib/pydoc.py (working copy) @@ -2017,20 +2017,20 @@ self.server = None self.scanner = None - import Tkinter - self.server_frm = Tkinter.Frame(window) - self.title_lbl = Tkinter.Label(self.server_frm, + import tkinter + self.server_frm = tkinter.Frame(window) + self.title_lbl = tkinter.Label(self.server_frm, text='Starting server...\n ') - self.open_btn = Tkinter.Button(self.server_frm, + self.open_btn = tkinter.Button(self.server_frm, text='open browser', command=self.open, state='disabled') - self.quit_btn = Tkinter.Button(self.server_frm, + self.quit_btn = tkinter.Button(self.server_frm, text='quit serving', command=self.quit, state='disabled') - self.search_frm = Tkinter.Frame(window) - self.search_lbl = Tkinter.Label(self.search_frm, text='Search for') - self.search_ent = Tkinter.Entry(self.search_frm) + self.search_frm = tkinter.Frame(window) + self.search_lbl = tkinter.Label(self.search_frm, text='Search for') + self.search_ent = tkinter.Entry(self.search_frm) self.search_ent.bind('', self.search) - self.stop_btn = Tkinter.Button(self.search_frm, + self.stop_btn = tkinter.Button(self.search_frm, text='stop', pady=0, command=self.stop, state='disabled') if sys.platform == 'win32': # Trying to hide and show this button crashes under Windows. @@ -2049,17 +2049,17 @@ self.search_ent.focus_set() font = ('helvetica', sys.platform == 'win32' and 8 or 10) - self.result_lst = Tkinter.Listbox(window, font=font, height=6) + self.result_lst = tkinter.Listbox(window, font=font, height=6) self.result_lst.bind('', self.select) self.result_lst.bind('', self.goto) - self.result_scr = Tkinter.Scrollbar(window, + self.result_scr = tkinter.Scrollbar(window, orient='vertical', command=self.result_lst.yview) self.result_lst.config(yscrollcommand=self.result_scr.set) - self.result_frm = Tkinter.Frame(window) - self.goto_btn = Tkinter.Button(self.result_frm, + self.result_frm = tkinter.Frame(window) + self.goto_btn = tkinter.Button(self.result_frm, text='go to selected', command=self.goto) - self.hide_btn = Tkinter.Button(self.result_frm, + self.hide_btn = tkinter.Button(self.result_frm, text='hide results', command=self.hide) self.goto_btn.pack(side='left', fill='x', expand=1) self.hide_btn.pack(side='right', fill='x', expand=1) @@ -2179,9 +2179,9 @@ self.stop() self.collapse() - import Tkinter + import tkinter try: - root = Tkinter.Tk() + root = tkinter.Tk() # Tk will crash if pythonw.exe has an XP .manifest # file and the root has is not destroyed explicitly. # If the problem is ever fixed in Tk, the explicit Index: Lib/lib-tk/tkMessageBox.py =================================================================== --- Lib/lib-tk/tkMessageBox.py (revision 0) +++ Lib/lib-tk/tkMessageBox.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the tkMessageBox module has been renamed " + "to 'tkinter.messagebox' in Python 3.0", stacklevel=2) + +import tkinter.messagebox +sys.modules[__name__] = tkinter.messagebox Index: Lib/lib-tk/FileDialog.py =================================================================== --- Lib/lib-tk/FileDialog.py (revision 0) +++ Lib/lib-tk/FileDialog.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the FileDialog module has been renamed " + "to 'tkinter.filedialog' in Python 3.0", stacklevel=2) + +import tkinter.filedialog +sys.modules[__name__] = tkinter.filedialog Index: Lib/lib-tk/tkColorChooser.py =================================================================== --- Lib/lib-tk/tkColorChooser.py (revision 0) +++ Lib/lib-tk/tkColorChooser.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the tkColorChooser module has been renamed " + "to 'tkinter.colorchooser' in Python 3.0", stacklevel=2) + +import tkinter.colorchooser +sys.modules[__name__] = tkinter.colorchooser Index: Lib/lib-tk/Tkdnd.py =================================================================== --- Lib/lib-tk/Tkdnd.py (revision 0) +++ Lib/lib-tk/Tkdnd.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the Tkdnd module has been renamed " + "to 'tkinter.dnd' in Python 3.0", stacklevel=2) + +import tkinter.dnd +sys.modules[__name__] = tkinter.dnd Index: Lib/lib-tk/Tix.py =================================================================== --- Lib/lib-tk/Tix.py (revision 0) +++ Lib/lib-tk/Tix.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the Tix module has been renamed " + "to 'tkinter.tix' in Python 3.0", stacklevel=2) + +import tkinter.tix +sys.modules[__name__] = tkinter.tix Index: Lib/lib-tk/tkFont.py =================================================================== --- Lib/lib-tk/tkFont.py (revision 0) +++ Lib/lib-tk/tkFont.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the tkFont module has been renamed " + "to 'tkinter.font' in Python 3.0", stacklevel=2) + +import tkinter.font +sys.modules[__name__] = tkinter.font Index: Lib/lib-tk/tkCommonDialog.py =================================================================== --- Lib/lib-tk/tkCommonDialog.py (revision 0) +++ Lib/lib-tk/tkCommonDialog.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the tkCommonDialog module has been renamed " + "to 'tkinter.commondialog' in Python 3.0", stacklevel=2) + +import tkinter.commondialog +sys.modules[__name__] = tkinter.commondialog Index: Lib/lib-tk/SimpleDialog.py =================================================================== --- Lib/lib-tk/SimpleDialog.py (revision 0) +++ Lib/lib-tk/SimpleDialog.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the SimpleDialog module has been renamed " + "to 'tkinter.simpledialog' in Python 3.0", stacklevel=2) + +import tkinter.simpledialog +sys.modules[__name__] = tkinter.simpledialog Index: Lib/lib-tk/Tkconstants.py =================================================================== --- Lib/lib-tk/Tkconstants.py (revision 0) +++ Lib/lib-tk/Tkconstants.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the Tkconstants module has been renamed " + "to 'tkinter.constants' in Python 3.0", stacklevel=2) + +import tkinter.constants +sys.modules[__name__] = tkinter.constants Index: Lib/lib-tk/Canvas.py =================================================================== --- Lib/lib-tk/Canvas.py (revision 63374) +++ Lib/lib-tk/Canvas.py (working copy) @@ -7,7 +7,7 @@ warnpy3k("the Canvas module has been removed in Python 3.0", stacklevel=2) del warnpy3k -from Tkinter import Canvas, _cnfmerge, _flatten +from tkinter import Canvas, _cnfmerge, _flatten class CanvasItem: Index: Lib/lib-tk/ScrolledText.py =================================================================== --- Lib/lib-tk/ScrolledText.py (revision 0) +++ Lib/lib-tk/ScrolledText.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the ScrolledText module has been renamed " + "to 'tkinter.scrolledtext' in Python 3.0", stacklevel=2) + +import tkinter.scrolledtext +sys.modules[__name__] = tkinter.scrolledtext Index: Lib/lib-tk/turtle.py =================================================================== --- Lib/lib-tk/turtle.py (revision 0) +++ Lib/lib-tk/turtle.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the turtle module has been renamed " + "to 'tkinter.turtle' in Python 3.0", stacklevel=2) + +import tkinter.turtle +sys.modules[__name__] = tkinter.turtle Index: Lib/lib-tk/Tkinter.py =================================================================== --- Lib/lib-tk/Tkinter.py (revision 0) +++ Lib/lib-tk/Tkinter.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the Tkinter module has been renamed " + "to 'tkinter' in Python 3.0", stacklevel=2) + +import tkinter +sys.modules[__name__] = tkinter Index: Lib/lib-tk/FixTk.py =================================================================== --- Lib/lib-tk/FixTk.py (revision 0) +++ Lib/lib-tk/FixTk.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the FixTk module has been renamed " + "to 'tkinter._fix' in Python 3.0", stacklevel=2) + +import tkinter._fix +sys.modules[__name__] = tkinter._fix Index: Lib/test/test_py3kwarn.py =================================================================== --- Lib/test/test_py3kwarn.py (revision 63374) +++ Lib/test/test_py3kwarn.py (working copy) @@ -212,6 +212,21 @@ 'SocketServer': 'socketserver', 'ConfigParser': 'configparser', 'repr': 'reprlib', + 'FileDialog': 'tkinter.filedialog', + 'FixTk': 'tkinter._fix', + 'ScrolledText': 'tkinter.scrolledtext', + 'SimpleDialog': 'tkinter.simpledialog', + 'Tix': 'tkinter.tix', + 'tkColorChooser': 'tkinter.colorchooser', + 'tkCommonDialog': 'tkinter.commondialog', + 'Tkconstants': 'tkinter.constants', + 'Tkdnd': 'tkinter.dnd', + 'tkFileDialog': 'tkinter.filedialog', + 'tkFont': 'tkinter.font', + 'Tkinter': 'tkinter', + 'tkMessageBox': 'tkinter.messagebox', + 'tkSimpleDialog': 'tkinter.simpledialog', + 'turtle': 'tkinter.turtle' } def check_rename(self, module_name, new_module_name):

AltStyle によって変換されたページ (->オリジナル) /