summaryrefslogtreecommitdiff
path: root/pypers/europython06/cherrypy_ex.py
diff options
context:
space:
mode:
Diffstat (limited to 'pypers/europython06/cherrypy_ex.py')
-rw-r--r--pypers/europython06/cherrypy_ex.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/pypers/europython06/cherrypy_ex.py b/pypers/europython06/cherrypy_ex.py
new file mode 100644
index 0000000..9b87389
--- /dev/null
+++ b/pypers/europython06/cherrypy_ex.py
@@ -0,0 +1,10 @@
+import cherrypy as cp
+
+class Root(object):
+ @cp.expose
+ def index(self):
+ return 'This is the index page'
+
+if __name__ == '__main__':
+ cp.root = Root()
+ cp.server.start()