mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Tkinter, step 2: adapt imports.
This commit is contained in:
parent
3302312383
commit
14fc4270da
50 changed files with 136 additions and 133 deletions
|
@ -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 @@ def view_file(parent, title, filename, encoding=None):
|
|||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue