mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
Renamed module tkinter to _tkinter
This commit is contained in:
parent
f39ca24ebc
commit
10d0f8fc40
7 changed files with 37 additions and 36 deletions
|
@ -1,7 +1,7 @@
|
|||
Several collections of example code for Tkinter.
|
||||
|
||||
See the toplevel README for an explanation of the difference between
|
||||
Tkinter and tkinter, how to enable the Python Tk interface, and where
|
||||
Tkinter and _tkinter, how to enable the Python Tk interface, and where
|
||||
to get Matt Conway's lifesaver document.
|
||||
|
||||
Subdirectories:
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
import regex
|
||||
from Tkinter import *
|
||||
from Tkinter import _tkinter
|
||||
from ScrolledText import ScrolledText
|
||||
|
||||
# XXX These fonts may have to be changed to match your system
|
||||
|
@ -44,7 +45,7 @@ class EditableManPage(ScrolledText):
|
|||
# Parse a file, in the background
|
||||
def asyncparsefile(self, fp):
|
||||
self._startparser(fp)
|
||||
self.tk.createfilehandler(fp, tkinter.READABLE,
|
||||
self.tk.createfilehandler(fp, _tkinter.READABLE,
|
||||
self._filehandler)
|
||||
|
||||
parsefile = asyncparsefile # Alias
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# This is about all it requires to write a wish shell in Python!
|
||||
|
||||
import tkinter
|
||||
import _tkinter
|
||||
import os
|
||||
|
||||
tk = tkinter.create(os.environ['DISPLAY'], 'wish', 'Tk', 1)
|
||||
tk = _tkinter.create(os.environ['DISPLAY'], 'wish', 'Tk', 1)
|
||||
tk.call('update')
|
||||
|
||||
cmd = ''
|
||||
|
@ -20,7 +20,7 @@ while 1:
|
|||
tk.record(line)
|
||||
try:
|
||||
result = tk.call('eval', cmd)
|
||||
except tkinter.TclError, msg:
|
||||
except _tkinter.TclError, msg:
|
||||
print 'TclError:', msg
|
||||
else:
|
||||
if result: print result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue