mirror of https://github.com/python/cpython
Provide full arguments to __import__ so it works in packagized IDLE.
This commit is contained in:
parent
06b787bdd1
commit
9dd52099fa
|
@ -484,7 +484,7 @@ class EditorWindow:
|
||||||
return extend.standard
|
return extend.standard
|
||||||
|
|
||||||
def load_extension(self, name):
|
def load_extension(self, name):
|
||||||
mod = __import__(name)
|
mod = __import__(name, globals(), locals(), [])
|
||||||
cls = getattr(mod, name)
|
cls = getattr(mod, name)
|
||||||
ins = cls(self)
|
ins = cls(self)
|
||||||
self.extensions[name] = ins
|
self.extensions[name] = ins
|
||||||
|
|
Loading…
Reference in New Issue