Commit aef82d3d authored by Brett Cannon's avatar Brett Cannon

IDLE was relying on implicit relative imports which have gone away in

Python 3.3 thanks to importlib finishing the work in PEP 328 that
accidently got carried forward.
parent 44590e47
import sys
import imp
import importlib
import os
import re
import string
import imp
import sys
from tkinter import *
import tkinter.simpledialog as tkSimpleDialog
import tkinter.messagebox as tkMessageBox
......@@ -1005,7 +1006,10 @@ class EditorWindow(object):
def load_extension(self, name):
try:
mod = __import__(name, globals(), locals(), [])
try:
mod = importlib.import_module('.' + name, package=__package__)
except ImportError:
mod = importlib.import_module(name)
except ImportError:
print("\nFailed to import extension: ", name)
raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment