Did I find the right examples for you? yes no

All Samples(18)  |  Call(18)  |  Derive(0)  |  Import(0)
get cgi variable by relative name (like cgi-get but in python): returns single match or default

        def cgiGet(env, name, default=None, strict=True):
    "get cgi variable by relative name (like cgi-get but in python): returns single match or default"
    dict = env.get(CGI_DICTIONARY)
    if dict is None:
        if strict:
            raise ValueError, "cannot get cgi name before cgi parameters have been parsed "+repr(name)
        return None
    #fullname = getName(env, name) # this is wrong because the cgi_dict has already been filtered to remove the prefix
    results = dict.get(name)
    if not results:
        return default
    elif len(results)>1 and strict:
        raise ValueError, "ambiguous cgi name "+repr((name, results))
    return results[0]
        


src/w/h/whiff-1.1/whiff/middleware/loadList.py   whiff(Download)
        #pr "loadList called with", (start, size, firstIndex)
        # if a cgi require "sourceValue" is provided it overrides matchPattern
        sourceValue = whiffenv.cgiGet(env, "sourceValue", strict=False)
        # by default do deferred focus
        doFocus = False

src/w/h/whiff-1.1/whiff/servers/fsCSI/fsCSIroot/getCompletionInfo2.py   whiff(Download)
        filteredValue = []
        generalCompletions = resourceValue[1]
        generalValue = whiffenv.cgiGet(env, "_any", "")
        generalMatches = completeValue(generalValue, generalCompletions)
        filteredValue.append(resourceValue[0][:50])
        filteredValue.append(generalMatches)
        completionsDict = resourceValue[2]
        filteredDict = {}
        for (attrName, attrMatches) in completionsDict:
            attrValue = whiffenv.cgiGet(env, attrName, "")

src/w/h/whiff-1.1/whiff/resources/GAETreeStore.py   whiff(Download)
        D["updateNode"] = self.updateNode
        D["actionUrl"] = self.actionUrl
        D["title"] = whiffenv.cgiGet(D, "title", node.title)
        D["body"] = whiffenv.cgiGet(D, "body", node.body)
        D["password"] = whiffenv.cgiGet(D, "password", "")
def testEditSource(env, node=None):
    from whiff import whiffenv
    cgiEditSourcestr = whiffenv.cgiGet(env, "editSource", None)
    #pr "cgiEditSourcestr", cgiEditSourcestr
    cgiEditSource = (cgiEditSourcestr=="true")
        D["parentId"] = self.parentId
        # NEED TO GET BODY, TITLE FROM CGI PARAMETERS!
        D["body"] = whiffenv.cgiGet(D, "body", "")
        D["title"] = whiffenv.cgiGet(D, "title", "")
        D["password"] = whiffenv.cgiGet(D, "password")

src/w/h/whiff-1.1/whiff/servers/fsCSI/fsCSIroot/getCompletionInfo.py   whiff(Download)
        filteredValue = []
        generalCompletions = resourceValue[1]
        generalValue = whiffenv.cgiGet(env, "_any", "")
        generalMatches = completeValue(generalValue, generalCompletions)
        filteredValue.append(resourceValue[0])

src/w/h/whiff-1.1/whiff/middleware/IfJavascriptUrl.py   whiff(Download)
    def __call__(self, env, start_response):
        env = resolver.process_cgi(env, parse_cgi=True)
        url = self.param_value(self.url, env).strip()
        relative_url = env[whiffenv.TEMPLATE_PATH]
        javaScriptEnabled = whiffenv.cgiGet(env, "javaScriptEnabled", False)

src/w/h/whiff-1.1/whiff/servers/fsCSI/fsCSIroot/fieldSetup.py   whiff(Download)
        for name in cgiDict:
            if not name.startswith('_'):
                value = whiffenv.cgiGet(env, name)
                L.append('addField("%s", "%s");\n' % (name, value))
        start_response("200 OK", [('Content-Type', 'application/javascript')])

src/w/h/whiff-1.1/whiff/middleware/urlToPage.py   whiff(Download)
    def __call__(self, env, start_response):
        env = resolver.process_cgi(env, parse_cgi=True)
        qcontent = whiffenv.cgiGet(env, "content")
        qjheaders = whiffenv.cgiGet(env, "headers")
        qstatus = whiffenv.cgiGet(env, "status")

src/w/h/whiff-1.1/whiff/middleware/cgiValue.py   whiff(Download)
        if not variable:
            raise ValueError, "envValue requires a non-empty variable name"
        value = whiffenv.cgiGet(env, variable)
        if value is None:
            # deliver the default