From aea9f6d5d3eb8513065583fa8e26d7687c39cc4b Mon Sep 17 00:00:00 2001 From: Roman Rolinsky Date: Wed, 14 Mar 2007 23:18:26 +0000 Subject: [PATCH] cleanup of modules loaded from comment directives git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wx/tools/XRCed/xrced.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wxPython/wx/tools/XRCed/xrced.py b/wxPython/wx/tools/XRCed/xrced.py index dda3b7c5b7..c68015a2ee 100644 --- a/wxPython/wx/tools/XRCed/xrced.py +++ b/wxPython/wx/tools/XRCed/xrced.py @@ -339,6 +339,9 @@ class Frame(wx.Frame): self.SetAutoLayout(True) self.SetSizer(sizer) + # Save sys.modules names + self.modules = set(sys.modules.keys()) + # Initialize self.Clear() @@ -1381,6 +1384,8 @@ Homepage: http://xrced.sourceforge.net\ # Handlers clearHandlers() g.pullDownMenu.clearCustom() + # Delete modules imported from comment directives + map(sys.modules.pop, [m for m in sys.modules if m not in self.modules]) def SetModified(self, state=True): self.modified = state -- 2.47.2