Tkinter rename reversal: remove tkinter package, adapt imports and docs.
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index d83b2ba..dccabad 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -18,14 +18,14 @@
command) or with the method bind.
Example (Hello, World):
-import tkinter
-from tkinter.constants import *
-tk = tkinter.Tk()
-frame = tkinter.Frame(tk, relief=RIDGE, borderwidth=2)
+import Tkinter
+from Tkconstants import *
+tk = Tkinter.Tk()
+frame = Tkinter.Frame(tk, relief=RIDGE, borderwidth=2)
frame.pack(fill=BOTH,expand=1)
-label = tkinter.Label(frame, text="Hello, World")
+label = Tkinter.Label(frame, text="Hello, World")
label.pack(fill=X, expand=1)
-button = tkinter.Button(frame,text="Exit",command=tk.destroy)
+button = Tkinter.Button(frame,text="Exit",command=tk.destroy)
button.pack(side=BOTTOM)
tk.mainloop()
"""
@@ -35,11 +35,12 @@
import sys
if sys.platform == "win32":
# Attempt to configure Tcl/Tk without requiring PATH
- from tkinter import _fix
+ import FixTk
import _tkinter # If this fails your Python may not be configured for Tk
+tkinter = _tkinter # b/w compat for export
TclError = _tkinter.TclError
from types import *
-from tkinter.constants import *
+from Tkconstants import *
try:
import MacOS; _MacOS = MacOS; del MacOS
except ImportError:
@@ -1697,7 +1698,7 @@
base_tcl = os.path.join(home, '.%s.tcl' % baseName)
base_py = os.path.join(home, '.%s.py' % baseName)
dir = {'self': self}
- exec 'from tkinter import *' in dir
+ exec 'from Tkinter import *' in dir
if os.path.isfile(class_tcl):
self.tk.call('source', class_tcl)
if os.path.isfile(class_py):