[ create a new paste ] login | about

Link: http://codepad.org/utsLP7Ve    [ raw code | fork ]

Python, pasted on Mar 19:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python

from circuits import Debugger
from circuits.web import Server, Controller


class Root(Controller):

    def index(self):
        """Index Request Handler

        Controller(s) expose implicitly methods as request handlers.
        Request Handlers can still be customized by using the ``@expose``
        decorator. For example exposing as a different path.
        """

        return "Hello World!"

(Server(("0.0.0.0", 9000)) + Debugger() + Root()).run()


Create a new paste based on this one


Comments: