Did I find the right examples for you? yes no      Crawl my project      Python Jobs

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

        def expose(*channels, **config):
    def decorate(f):
        @handler(*channels, **config)
        def wrapper(self, event, *args, **kwargs):
                if not hasattr(self, "request"):
                    (self.request, self.response), args = args[:2], args[2:]
                    self.request.args = args
                    self.request.kwargs = kwargs
                    self.cookie = self.request.cookie
                    if hasattr(self.request, "session"):
                        self.session = self.request.session
                if not getattr(f, "event", False):
                    return f(self, *args, **kwargs)
                    return f(self, event, *args, **kwargs)
                if hasattr(self, "request"):
                    del self.request
                    del self.response
                    del self.cookie
                if hasattr(self, "session"):
                    del self.session

        wrapper.args, wrapper.varargs, wrapper.varkw, wrapper.defaults = \
        if wrapper.args and wrapper.args[0] == "self":
            del wrapper.args[0]

        if wrapper.args and wrapper.args[0] == "event":
            f.event = True
            del wrapper.args[0]
        wrapper.event = True

        return update_wrapper(wrapper, f)

    return decorate

src/c/i/circuits-3.0.0.dev/tests/web/test_vpath_args.py   circuits(Download)
#!/usr/bin/env python
from circuits.web import expose, Controller
from .helpers import urlopen

src/c/i/circuits-3.0.0.dev/tests/web/test_expose.py   circuits(Download)
from circuits.web import expose, Controller
from .helpers import urlopen

src/c/i/circuits-3.0.0.dev/tests/web/test_dispatcher2.py   circuits(Download)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from circuits.web import expose, Controller