11 ihooks.ModuleImporter.__init__(self)
16 testpath = name +
".py" 19 if os.path.isfile(testpath):
20 stinfo = os.stat(testpath)
24 if sys.modules.has_key(name):
27 m = ihooks.ModuleImporter.import_module(self,name,globals,locals,fromlist)
30 if os.path.isfile(testpath):
31 stinfo = os.stat(testpath)
32 except AttributeError:
pass 36 stored_time = self.datestamps.get(testpath,0)
37 if stored_time < stinfo.st_mtime:
41 warn(
"---------------------", name,
"changed reloading", stored_time, stinfo.st_mtime, os.getcwd())
43 reload(sys.modules[name])
48 m = ihooks.ModuleImporter.import_module(self,name,globals,locals,fromlist)
51 stinfo = os.stat(testpath)
52 if os.path.isfile(testpath):
54 except AttributeError:
60 warn(
"**********************8 installing autoreload")
def import_module(self, name, globals={}, locals={}, fromlist={})