aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/idlelib/macosxSupport.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/macosxSupport.py')
-rw-r--r--Lib/idlelib/macosxSupport.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py
index af6652fb6f2..96904429af8 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
from os import path
@@ -72,7 +72,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
@@ -92,7 +92,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 idlelib.EditorWindow import prepstr, get_accelerator
from idlelib import Bindings
from idlelib import WindowList
@@ -121,6 +121,12 @@ def overrideRootMenu(root, flist):
def config_dialog(event=None):
from idlelib import configDialog
+
+ # Ensure that the root object has an instance_dict attribute,
+ # mirrors code in EditorWindow (although that sets the attribute
+ # on an EditorWindow instance that is then passed as the first
+ # argument to ConfigDialog)
+ root.instance_dict = flist.inversedict
root.instance_dict = flist.inversedict
configDialog.ConfigDialog(root, 'Settings')