Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
trim cgi-prefix, if present, from global_name

        def local_cgi_name(global_name, env):
    "trim cgi-prefix, if present, from global_name"
    prefix = env.get(whiffenv.FULL_CGI_PREFIX, None)
    if prefix is None:
        return global_name
    if global_name.startswith(prefix):
        return global_name[len(prefix):]
    raise ValueError, "global variable name does not match cgi_prefix "+repr((global_name, prefix))
        


src/w/h/whiff-1.1/whiff/middleware/skimpy.py   whiff(Download)
    def __call__(self, env, start_response):
        #pr; #pr "skimpy entered at", time.time()
        secretPath = self.param_json(self.secretPath, env)
        variable = self.param_value(self.variable, env)
        variable = resolver.local_cgi_name(variable, env)