def load_module(self, fullname): path = fullname.split('.') path[-1] += '.py' filename = os.path.join(self.__path, *path) module = sys.modules.get(fullname) if not module: src = Preprocess.run(open(filename, 'rb').read()) module = imp.new_module(fullname) sys.modules[fullname] = module #module = sys.modules[fullname] = addMod(fullname) setSocialiteVars(module.__dict__) locals = module.__dict__ locals["__name__"] = fullname locals["__file__"] = filename if src[0]=='#': src = removeEncoding(src) exec src in module.__dict__ return module;
def compile(self, src): gen=Preprocess.run(src) return gen
def compile(self, src): gen = Preprocess.run(src) return gen