From 9dd52099fa5c337407fcc29f4ae6805aef39b973 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 23 Apr 1999 14:01:25 +0000 Subject: [PATCH] Provide full arguments to __import__ so it works in packagized IDLE. --- Tools/idle/EditorWindow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/idle/EditorWindow.py b/Tools/idle/EditorWindow.py index 2c1977566c1..2ae69cfa8a8 100644 --- a/Tools/idle/EditorWindow.py +++ b/Tools/idle/EditorWindow.py @@ -484,7 +484,7 @@ class EditorWindow: return extend.standard def load_extension(self, name): - mod = __import__(name) + mod = __import__(name, globals(), locals(), []) cls = getattr(mod, name) ins = cls(self) self.extensions[name] = ins