Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

        def asMiddleware(stream, env):
    def middleware(**args):
        d = deferBindings(stream, {})
        if env.has_key(whiffenv.ROOT):
            root_application = env[whiffenv.ROOT]
            responding_path = env[whiffenv.TEMPLATE_PATH]
            path_remainder = ""
            d.bind_root(root_application, responding_path, path_remainder)
        return d.duplicate(**args)
    return middleware
        


src/w/h/whiff-1.1/whiff/middleware/loadList.py   whiff(Download)
        style = self.param_value(self.style, env)
        matchPattern = self.param_value(self.matchPattern, env).strip()
        getter = stream.asMiddleware(self.getter, env)
        envelope = stream.asMiddleware(self.envelope, env)
        firstIndex = self.param_json(self.firstIndex, env)