summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-20 07:13:37 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-20 07:13:37 (GMT)
commit6634bf2919d855ccd821e878b8cc00c7209f1cbe (patch)
tree77ef2dfaaf00ec144e75ac19708e4dd457604ebc /Lib/idlelib
parent33cece05b918dff706a4298e33f84d8e8a0391d2 (diff)
downloadcpython-6634bf2919d855ccd821e878b8cc00c7209f1cbe.zip
cpython-6634bf2919d855ccd821e878b8cc00c7209f1cbe.tar.gz
cpython-6634bf2919d855ccd821e878b8cc00c7209f1cbe.tar.bz2
Tkinter rename reversal: remove tkinter package, adapt imports and docs.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/AutoCompleteWindow.py2
-rw-r--r--Lib/idlelib/CallTipWindow.py2
-rw-r--r--Lib/idlelib/CodeContext.py6
-rw-r--r--Lib/idlelib/ColorDelegator.py2
-rw-r--r--Lib/idlelib/Debugger.py2
-rw-r--r--Lib/idlelib/EditorWindow.py8
-rw-r--r--Lib/idlelib/FileList.py4
-rw-r--r--Lib/idlelib/GrepDialog.py2
-rw-r--r--Lib/idlelib/IOBinding.py8
-rw-r--r--Lib/idlelib/MultiCall.py8
-rw-r--r--Lib/idlelib/MultiStatusBar.py2
-rw-r--r--Lib/idlelib/ObjectBrowser.py2
-rw-r--r--Lib/idlelib/OutputWindow.py4
-rw-r--r--Lib/idlelib/Percolator.py2
-rw-r--r--Lib/idlelib/PyShell.py10
-rw-r--r--Lib/idlelib/ReplaceDialog.py2
-rw-r--r--Lib/idlelib/ScriptBinding.py2
-rw-r--r--Lib/idlelib/ScrolledList.py2
-rw-r--r--Lib/idlelib/SearchDialog.py2
-rw-r--r--Lib/idlelib/SearchDialogBase.py2
-rw-r--r--Lib/idlelib/SearchEngine.py4
-rw-r--r--Lib/idlelib/StackViewer.py4
-rw-r--r--Lib/idlelib/ToolTip.py2
-rw-r--r--Lib/idlelib/TreeWidget.py2
-rw-r--r--Lib/idlelib/UndoDelegator.py2
-rw-r--r--Lib/idlelib/WidgetRedirector.py2
-rw-r--r--Lib/idlelib/WindowList.py2
-rw-r--r--Lib/idlelib/aboutDialog.py2
-rw-r--r--Lib/idlelib/configDialog.py6
-rw-r--r--Lib/idlelib/configHelpSourceEdit.py6
-rw-r--r--Lib/idlelib/configSectionNameDialog.py4
-rw-r--r--Lib/idlelib/dynOptionMenuWidget.py4
-rw-r--r--Lib/idlelib/keybindingDialog.py4
-rw-r--r--Lib/idlelib/macosxSupport.py6
-rw-r--r--Lib/idlelib/run.py6
-rw-r--r--Lib/idlelib/tabbedpages.py2
-rw-r--r--Lib/idlelib/textView.py6
37 files changed, 68 insertions, 70 deletions
diff --git a/Lib/idlelib/AutoCompleteWindow.py b/Lib/idlelib/AutoCompleteWindow.py
index ab132c1..635775d 100644
--- a/Lib/idlelib/AutoCompleteWindow.py
+++ b/Lib/idlelib/AutoCompleteWindow.py
@@ -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
diff --git a/Lib/idlelib/CallTipWindow.py b/Lib/idlelib/CallTipWindow.py
index 27ed085..2223885 100644
--- a/Lib/idlelib/CallTipWindow.py
+++ b/Lib/idlelib/CallTipWindow.py
@@ -4,7 +4,7 @@ After ToolTip.py, which uses ideas gleaned from PySol
Used by the CallTips IDLE extension.
"""
-from tkinter import *
+from Tkinter import *
HIDE_VIRTUAL_EVENT_NAME = "<<calltipwindow-hide>>"
HIDE_SEQUENCES = ("<Key-Escape>", "<FocusOut>")
diff --git a/Lib/idlelib/CodeContext.py b/Lib/idlelib/CodeContext.py
index 941bb26..420ec33 100644
--- a/Lib/idlelib/CodeContext.py
+++ b/Lib/idlelib/CodeContext.py
@@ -9,8 +9,8 @@ variable in the CodeContext section of config-extensions.def. Lines which do
not open blocks are not shown in the context hints pane.
"""
-import tkinter
-from tkinter.constants import TOP, LEFT, X, W, SUNKEN
+import Tkinter
+from Tkconstants import TOP, LEFT, X, W, SUNKEN
from configHandler import idleConf
import re
from sys import maxint as INFINITY
@@ -69,7 +69,7 @@ class CodeContext:
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,
diff --git a/Lib/idlelib/ColorDelegator.py b/Lib/idlelib/ColorDelegator.py
index fb84805..e55f9e6 100644
--- a/Lib/idlelib/ColorDelegator.py
+++ b/Lib/idlelib/ColorDelegator.py
@@ -2,7 +2,7 @@ import time
import re
import keyword
import __builtin__
-from tkinter import *
+from Tkinter import *
from Delegator import Delegator
from configHandler import idleConf
diff --git a/Lib/idlelib/Debugger.py b/Lib/idlelib/Debugger.py
index fa2a56b..a56c224 100644
--- a/Lib/idlelib/Debugger.py
+++ b/Lib/idlelib/Debugger.py
@@ -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
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 2f728b3..8d35198c 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -3,9 +3,9 @@ import os
import re
import imp
from itertools import count
-from tkinter import *
-import tkinter.simpledialog as tkSimpleDialog
-import tkinter.messagebox as tkMessageBox
+from Tkinter import *
+import tkSimpleDialog
+import tkMessageBox
from MultiCall import MultiCallCreator
import webbrowser
@@ -45,7 +45,7 @@ class EditorWindow(object):
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
diff --git a/Lib/idlelib/FileList.py b/Lib/idlelib/FileList.py
index 4520334..e40c7a7 100644
--- a/Lib/idlelib/FileList.py
+++ b/Lib/idlelib/FileList.py
@@ -1,6 +1,6 @@
import os
-from tkinter import *
-import tkinter.messagebox as tkMessageBox
+from Tkinter import *
+import tkMessageBox
class FileList:
diff --git a/Lib/idlelib/GrepDialog.py b/Lib/idlelib/GrepDialog.py
index ccee522..ab136bc 100644
--- a/Lib/idlelib/GrepDialog.py
+++ b/Lib/idlelib/GrepDialog.py
@@ -1,7 +1,7 @@
import os
import fnmatch
import sys
-from tkinter import *
+from Tkinter import *
import SearchEngine
from SearchDialogBase import SearchDialogBase
diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py
index e18ff3f..01d278e 100644
--- a/Lib/idlelib/IOBinding.py
+++ b/Lib/idlelib/IOBinding.py
@@ -10,11 +10,11 @@ import types
import sys
import codecs
import tempfile
-import tkinter.filedialog as tkFileDialog
-import tkinter.messagebox as tkMessageBox
+import tkFileDialog
+import tkMessageBox
import re
-from tkinter import *
-from tkinter.simpledialog import SimpleDialog
+from Tkinter import *
+from SimpleDialog import SimpleDialog
from configHandler import idleConf
diff --git a/Lib/idlelib/MultiCall.py b/Lib/idlelib/MultiCall.py
index 269ab3f..51de639 100644
--- a/Lib/idlelib/MultiCall.py
+++ b/Lib/idlelib/MultiCall.py
@@ -32,7 +32,7 @@ Each function will be called at most once for each event.
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 @@ def MultiCallCreator(widget):
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 @@ def MultiCallCreator(widget):
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):
diff --git a/Lib/idlelib/MultiStatusBar.py b/Lib/idlelib/MultiStatusBar.py
index dadc42d..2d4c547 100644
--- a/Lib/idlelib/MultiStatusBar.py
+++ b/Lib/idlelib/MultiStatusBar.py
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
class MultiStatusBar(Frame):
diff --git a/Lib/idlelib/ObjectBrowser.py b/Lib/idlelib/ObjectBrowser.py
index c328cdc..8ff0041 100644
--- a/Lib/idlelib/ObjectBrowser.py
+++ b/Lib/idlelib/ObjectBrowser.py
@@ -136,7 +136,7 @@ def make_objecttreeitem(labeltext, object, setfunction=None):
def _test():
import sys
- from tkinter import Tk
+ from Tkinter import Tk
root = Tk()
root.configure(bd=0, bg="yellow")
root.focus_set()
diff --git a/Lib/idlelib/OutputWindow.py b/Lib/idlelib/OutputWindow.py
index afc4e39..787e9b0 100644
--- a/Lib/idlelib/OutputWindow.py
+++ b/Lib/idlelib/OutputWindow.py
@@ -1,7 +1,7 @@
-from tkinter import *
+from Tkinter import *
from EditorWindow import EditorWindow
import re
-import tkinter.messagebox as tkMessageBox
+import tkMessageBox
import IOBinding
class OutputWindow(EditorWindow):
diff --git a/Lib/idlelib/Percolator.py b/Lib/idlelib/Percolator.py
index 21d8a47..ebbcba9 100644
--- a/Lib/idlelib/Percolator.py
+++ b/Lib/idlelib/Percolator.py
@@ -81,5 +81,5 @@ def main():
root.mainloop()
if __name__ == "__main__":
- from tkinter import *
+ from Tkinter import *
main()
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 4754866..a17f81f 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -17,12 +17,12 @@ import linecache
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 tkinter.messagebox as tkMessageBox
+import tkMessageBox
from EditorWindow import EditorWindow, fixwordbreaks
from FileList import FileList
@@ -992,8 +992,8 @@ class PyShell(OutputWindow):
(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):
diff --git a/Lib/idlelib/ReplaceDialog.py b/Lib/idlelib/ReplaceDialog.py
index c8f6784..c8eb1c8 100644
--- a/Lib/idlelib/ReplaceDialog.py
+++ b/Lib/idlelib/ReplaceDialog.py
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
import SearchEngine
from SearchDialogBase import SearchDialogBase
diff --git a/Lib/idlelib/ScriptBinding.py b/Lib/idlelib/ScriptBinding.py
index c6892f3..cb01110 100644
--- a/Lib/idlelib/ScriptBinding.py
+++ b/Lib/idlelib/ScriptBinding.py
@@ -22,7 +22,7 @@ import re
import string
import tabnanny
import tokenize
-import tkinter.messagebox as tkMessageBox
+import tkMessageBox
import PyShell
from configHandler import idleConf
diff --git a/Lib/idlelib/ScrolledList.py b/Lib/idlelib/ScrolledList.py
index f923488..92119365 100644
--- a/Lib/idlelib/ScrolledList.py
+++ b/Lib/idlelib/ScrolledList.py
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
class ScrolledList:
diff --git a/Lib/idlelib/SearchDialog.py b/Lib/idlelib/SearchDialog.py
index 6c90d28..d7124d6 100644
--- a/Lib/idlelib/SearchDialog.py
+++ b/Lib/idlelib/SearchDialog.py
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
import SearchEngine
from SearchDialogBase import SearchDialogBase
diff --git a/Lib/idlelib/SearchDialogBase.py b/Lib/idlelib/SearchDialogBase.py
index 65914ac..f63e7ae 100644
--- a/Lib/idlelib/SearchDialogBase.py
+++ b/Lib/idlelib/SearchDialogBase.py
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
class SearchDialogBase:
diff --git a/Lib/idlelib/SearchEngine.py b/Lib/idlelib/SearchEngine.py
index 2d05af8..cc40a00 100644
--- a/Lib/idlelib/SearchEngine.py
+++ b/Lib/idlelib/SearchEngine.py
@@ -1,6 +1,6 @@
import re
-from tkinter import *
-import tkinter.messagebox as tkMessageBox
+from Tkinter import *
+import tkMessageBox
def get(root):
if not hasattr(root, "_searchengine"):
diff --git a/Lib/idlelib/StackViewer.py b/Lib/idlelib/StackViewer.py
index 794726d..6b7730b 100644
--- a/Lib/idlelib/StackViewer.py
+++ b/Lib/idlelib/StackViewer.py
@@ -7,7 +7,7 @@ from ObjectBrowser import ObjectTreeItem, make_objecttreeitem
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 @@ def _test():
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()
diff --git a/Lib/idlelib/ToolTip.py b/Lib/idlelib/ToolTip.py
index b178803..ce7a3d3 100644
--- a/Lib/idlelib/ToolTip.py
+++ b/Lib/idlelib/ToolTip.py
@@ -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:
diff --git a/Lib/idlelib/TreeWidget.py b/Lib/idlelib/TreeWidget.py
index 876cb0d..5299e0e 100644
--- a/Lib/idlelib/TreeWidget.py
+++ b/Lib/idlelib/TreeWidget.py
@@ -15,7 +15,7 @@
# - optimize tree redraw after expand of subnode
import os
-from tkinter import *
+from Tkinter import *
import imp
import ZoomHeight
diff --git a/Lib/idlelib/UndoDelegator.py b/Lib/idlelib/UndoDelegator.py
index 544be10..5896bd5 100644
--- a/Lib/idlelib/UndoDelegator.py
+++ b/Lib/idlelib/UndoDelegator.py
@@ -1,5 +1,5 @@
import string
-from tkinter import *
+from Tkinter import *
from Delegator import Delegator
#$ event <<redo>>
diff --git a/Lib/idlelib/WidgetRedirector.py b/Lib/idlelib/WidgetRedirector.py
index a87e650..7c341f2 100644
--- a/Lib/idlelib/WidgetRedirector.py
+++ b/Lib/idlelib/WidgetRedirector.py
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
class WidgetRedirector:
diff --git a/Lib/idlelib/WindowList.py b/Lib/idlelib/WindowList.py
index ccf35a8..658502b 100644
--- a/Lib/idlelib/WindowList.py
+++ b/Lib/idlelib/WindowList.py
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
class WindowList:
diff --git a/Lib/idlelib/aboutDialog.py b/Lib/idlelib/aboutDialog.py
index 4900c09..008602c 100644
--- a/Lib/idlelib/aboutDialog.py
+++ b/Lib/idlelib/aboutDialog.py
@@ -2,7 +2,7 @@
"""
-from tkinter import *
+from Tkinter import *
import os
import os.path
import textView
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py
index 68cc3fe..acab053 100644
--- a/Lib/idlelib/configDialog.py
+++ b/Lib/idlelib/configDialog.py
@@ -9,10 +9,8 @@ Note that tab width in IDLE is currently fixed at eight due to Tk issues.
Refer to comments in EditorWindow autoindent code for details.
"""
-from tkinter import *
-import tkinter.messagebox as tkMessageBox
-import tkinter.colorchooser as tkColorChooser
-import tkinter.font as tkFont
+from Tkinter import *
+import tkMessageBox, tkColorChooser, tkFont
import string
from configHandler import idleConf
diff --git a/Lib/idlelib/configHelpSourceEdit.py b/Lib/idlelib/configHelpSourceEdit.py
index b80c548..6611621 100644
--- a/Lib/idlelib/configHelpSourceEdit.py
+++ b/Lib/idlelib/configHelpSourceEdit.py
@@ -3,9 +3,9 @@
import os
import sys
-from tkinter import *
-import tkinter.messagebox as tkMessageBox
-import tkinter.filedialog as tkFileDialog
+from Tkinter import *
+import tkMessageBox
+import tkFileDialog
class GetHelpSourceDialog(Toplevel):
def __init__(self, parent, title, menuItem='', filePath=''):
diff --git a/Lib/idlelib/configSectionNameDialog.py b/Lib/idlelib/configSectionNameDialog.py
index bcf132c..4f1b002 100644
--- a/Lib/idlelib/configSectionNameDialog.py
+++ b/Lib/idlelib/configSectionNameDialog.py
@@ -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 tkinter.messagebox as tkMessageBox
+from Tkinter import *
+import tkMessageBox
class GetCfgSectionNameDialog(Toplevel):
def __init__(self,parent,title,message,usedNames):
diff --git a/Lib/idlelib/dynOptionMenuWidget.py b/Lib/idlelib/dynOptionMenuWidget.py
index 90fc323..e81f7ba 100644
--- a/Lib/idlelib/dynOptionMenuWidget.py
+++ b/Lib/idlelib/dynOptionMenuWidget.py
@@ -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):
diff --git a/Lib/idlelib/keybindingDialog.py b/Lib/idlelib/keybindingDialog.py
index e58ac73..1ce7ff4 100644
--- a/Lib/idlelib/keybindingDialog.py
+++ b/Lib/idlelib/keybindingDialog.py
@@ -1,8 +1,8 @@
"""
Dialog for building Tkinter accelerator key bindings
"""
-from tkinter import *
-import tkinter.messagebox as tkMessageBox
+from Tkinter import *
+import tkMessageBox
import string
class GetKeysDialog(Toplevel):
diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py
index c76381d..222abfc 100644
--- a/Lib/idlelib/macosxSupport.py
+++ b/Lib/idlelib/macosxSupport.py
@@ -3,7 +3,7 @@ A number of function that enhance IDLE on MacOSX when it used as a normal
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 addOpenEventSupport(root, flist):
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 @@ def overrideRootMenu(root, flist):
#
# 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
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index 18ddca7..8abbe50 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -127,9 +127,9 @@ def manage_socket(address):
server.handle_request() # A single request only
def show_socket_error(err, address):
- import tkinter
- import tkinter.messagebox as tkMessageBox
- root = tkinter.Tk()
+ import Tkinter
+ import 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 "\
diff --git a/Lib/idlelib/tabbedpages.py b/Lib/idlelib/tabbedpages.py
index 429af5d..8d7113d 100644
--- a/Lib/idlelib/tabbedpages.py
+++ b/Lib/idlelib/tabbedpages.py
@@ -7,7 +7,7 @@ TabbedPageSet -- A Tkinter implementation of a tabbed-page widget.
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
diff --git a/Lib/idlelib/textView.py b/Lib/idlelib/textView.py
index 3f3c247..0e7e663 100644
--- a/Lib/idlelib/textView.py
+++ b/Lib/idlelib/textView.py
@@ -2,8 +2,8 @@
"""
-from tkinter import *
-import tkinter.messagebox as tkMessageBox
+from Tkinter import *
+import 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 tkinter.messagebox as tkMessageBox
+ import tkMessageBox
tkMessageBox.showerror(title='File Load Error',
message='Unable to load file %r .' % filename,
parent=parent)