Did I find the right examples for you? yes no

All Samples(34)  |  Call(34)  |  Derive(0)  |  Import(0)
evaluate a require, which may be a sub-stream or a page

src/w/h/whiff-1.1/whiff/middleware/loadList.py   whiff(Download)
        #    cgi_pairs = '[["sourceValue", "%s"]]' % start
        loadApp = EvalPageFunction.evalPageFunction(page, cgi_pairs=cgi_pairs, asynchronous=asynchronous)
        loadFunction = self.param_value(loadApp, env)
        return reloadTargetFunction(source, target, loadFunction)
    def __call__(self, env, start_response):
        # copy the environment for safety
        env = env.copy()
        next = self.param_value(self.next, env)
        previous = self.param_value(self.previous, env)
        source = self.param_value(self.source, env)
        positioner = self.param_value(self.positioner, env).strip()
        if not positioner:
            positioner = source
        dataName = self.param_value(self.dataName, env)

src/w/h/whiff-1.1/whiff/middleware/EvalPageFunction.py   whiff(Download)
        #pr "   page = ", repr(self.page)
        # evaluate the URL
        url = self.param_value(self.url, env)
        url = url.strip()
        contentCallback = self.param_value(self.contentCallback, env).strip()
        pageContent = self.param_text(self.page)
        if self.prefix:
            prefix = self.param_value(self.prefix, env)
            prefix = env.get(whiffenv.FULL_CGI_PREFIX, "")
        prefix = prefix.strip()
        #cgi_pairs = self.param_json(self.cgi_pairs, env)
        cgi_pairs = self.param_value(self.cgi_pairs, env)
        # adjust the environment relative to relative url if provided
        if self.expandRelativeTo is not None:
            rUrl = self.param_value(self.expandRelativeTo,env)
            #pr "eval page setting relative url", repr(rUrl)
            relativeUrl = jsonParse.formatString(rUrl)

src/w/h/whiff-1.1/whiff/middleware/loadMonth.py   whiff(Download)
    def __call__(self, env, start_response):
        source = self.param_value(self.source, env)
        positioner = self.param_value(self.positioner, env).strip()
        #pr "got positioner", positioner
        if not positioner:
            positioner = source
        sourceAction = self.param_value(self.sourceAction, env)
        prefix = self.param_value(self.prefix, env)
        month = self.param_json(self.month, env)
        day = self.param_json(self.day, env)
        target = self.param_value(self.target, env)
        ymd = self.param_value(self.ymd, env).strip()
        #pr "loadMonth called with", (prefix, year, month, day, target)
        #pr "loadMonth adjusted with", (prefix, year, month, day, target)
        (month, day, year) = monthHtml.fixMDY(month, day, year)
        style = self.param_value(self.style, env)
        # get set innerhtml action to set target content
        monthTextApp = monthHtml.MonthHtml(prefix, year, month, day, style)

src/w/h/whiff-1.1/whiff/middleware/GetPageLink.py   whiff(Download)
        # do expand the "expandRelativeTo" and cgi_arguments
        if self.expandRelativeTo:
            rurl = cgi_dictionary["relativeURL"] = self.param_value(self.expandRelativeTo, env)
            env = expandPostedTemplate.relativeEnvironment(env, rurl)
        elif env.has_key(whiffenv.ENTRY_POINT):
            cgi_dictionary["relativeURL"] = env[whiffenv.ENTRY_POINT]
        for (k,v) in self.cgi_arguments.items():
            cgi_dictionary[k] = self.param_value(v, env)
        query_string = urllib.urlencode(cgi_dictionary)
        expanderUrl = self.param_value(self.expanderUrl, env)

src/w/h/whiff-1.1/whiff/middleware/loadTemplateFunction.py   whiff(Download)
        prefix = self.prefix
        # expand the non-templates
        eId = self.param_value(elementId, env)
        if eId: eId = eId.strip()
        expUrl = self.param_value(expanderUrl, env)
        if expUrl: expUrl = expUrl.strip()
        expRelative = self.param_value(expandRelativeTo, env)
        if expRelative: expRelative = expRelative.strip()
        prefix = self.param_value(prefix, env)

src/w/h/whiff-1.1/whiff/middleware/setInnerHtml.py   whiff(Download)
    def __call__(self, env, start_response):
        # get name as a string
        name = self.param_value(self.elementName, env)
        if name:
            name = name.strip()
        #pr "setInnerHtml.__call__"
        # evaluate the page
        pageContent = self.param_value(self.page, env)
        #pr "page content", repr(pageContent)
        pageContentArray = misc.jsListFromString(pageContent)

src/w/h/whiff-1.1/whiff/middleware/setTarget.py   whiff(Download)
            yield("var lastSetTargetAction = function () {")
            yield("   // get the target")
            target = self.param_value(self.target, env)
            target = target.strip()
            yield('   var target = document.getElementById("%s");' % target)
                self.asynchronous, self.prefix, doCall=True)
            #return dump(app(env, start_response))
            page = self.param_value(app,env)
            # need to quote page so it survives the first round trip
            page = parseTemplate.quoteText(page)

src/w/h/whiff-1.1/whiff/middleware/CallPageFunction.py   whiff(Download)
        argsList = []
        for (name, value) in argsitems:
            arg_text = self.param_value(value, env)
            arg_using = "{{using %s}}%s{{/using}}" % (name, arg_text)