From: Tavis R. <ta...@ca...> - 2001-04-03 22:19:28
|
Geoff, the module refresh code in PythonServletFactory.servletForTransaction says: module = self.importAsPackage(transaction, path) which eventually calls _importModuleFromDirectory, but without the forceReload flag set. It looks like _importModuleFromDirectory just spits back the existing copy in sys.modules. But why does this still work on NT??? Are you using a different servletFactory? PSP doesn't seem to be affected. Maybe importAsPackage() should call _importModuleFromDirectory with this flag. Or the signature of importAsPackage() could be changed to def importAsPackage(self, transaction, serverSidePathToImport, forceReload=0): and line 86 changed to module = self._importModuleFromDirectory(fullname, name, moduleDir, forceReload=forceReload) ------------------------------------------------------- from rev1.15 of ServletFactory.py [SNIP] Line #86 module = self._importModuleFromDirectory(fullname, name, moduleDir) return module def _importModuleFromDirectory(self, fullModuleName, moduleName, directory, isPackageDir=0, forceReload=0): """ [SNIP] """ if not forceReload: module = sys.modules.get(fullModuleName, None) if module is not None: return module ... |