openmedialibrary_platform/Darwin/lib/python2.7/site-packages/twisted/web/demo.py

25 lines
503 B
Python
Raw Normal View History

2013-10-11 17:28:32 +00:00
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
I am a simple test resource.
"""
from twisted.web import static
class Test(static.Data):
isLeaf = True
def __init__(self):
static.Data.__init__(
self,
"""
<html>
<head><title>Twisted Web Demo</title><head>
<body>
Hello! This is a Twisted Web test page.
</body>
</html>
""",
"text/html")