#!/usr/bin/env python
import webbrowser
from circuits.web import Controller, Server
HTML = """\
An example application
This is my sample application
Put the content here...
Quit
"""
class Root(Controller):
def index(self):
return HTML
def exit(self):
raise SystemExit(0)
app = Server(("0.0.0.0", 8000))
Root().register(app)
app.start()
webbrowser.open("http://127.0.0.1:8000/")
app.join()