micropython/__init__.py | raw changeset files shortlog |
1.1 --- a/micropython/__init__.py Wed Oct 17 01:31:33 2007 +0200 1.2 +++ b/micropython/__init__.py Sat Oct 20 01:36:44 2007 +0200 1.3 @@ -54,6 +54,16 @@ 1.4 self.modules = {} 1.5 self.loading = set() 1.6 1.7 + def vacuum(self): 1.8 + 1.9 + "Tidy up the modules." 1.10 + 1.11 + for name, module in self.modules.items(): 1.12 + if module.loaded: 1.13 + module.vacuum() 1.14 + else: 1.15 + del self.modules[name] 1.16 + 1.17 def get_modules(self): 1.18 1.19 "Return all modules known to the importer."