/usr/lib/python3/dist-packages/twisted/web
NameSizeModeActions
test/-0755rm
_auth/-0755rm
__pycache__/-0755rm
client.py760620644editdlrm
demo.py5540644editdlrm
distrib.py118770644editdlrm
domhelpers.py86450644editdlrm
error.py127640644editdlrm
guard.py6300644editdlrm
html.py15570644editdlrm
http.py1046340644editdlrm
http_headers.py82310644editdlrm
iweb.py255710644editdlrm
microdom.py361970644editdlrm
proxy.py98350644editdlrm
resource.py131080644editdlrm
rewrite.py18520644editdlrm
script.py57450644editdlrm
server.py275090644editdlrm
static.py380070644editdlrm
sux.py208920644editdlrm
tap.py98460644editdlrm
template.py176310644editdlrm
twcgi.py113430644editdlrm
util.py124520644editdlrm
vhost.py45870644editdlrm
wsgi.py218790644editdlrm
xmlrpc.py202030644editdlrm
_element.py59470644editdlrm
_flatten.py159120644editdlrm
_http2.py491860644editdlrm
_newclient.py639730644editdlrm
_responses.py36550644editdlrm
_stan.py107900644editdlrm
__init__.py6990644editdlrm
Edit: /usr/lib/python3/dist-packages/twisted/web/html.py (1557B)
# -*- test-case-name: twisted.web.test.test_html -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """I hold HTML generation helpers. """ from twisted.python import log from twisted.python.compat import NativeStringIO as StringIO, escape from twisted.python.deprecate import deprecated from incremental import Version @deprecated(Version('Twisted', 15, 3, 0), replacement='twisted.web.template') def PRE(text): "Wrap
 tags around some text and HTML-escape it."
    return "
"+escape(text)+"
" @deprecated(Version('Twisted', 15, 3, 0), replacement='twisted.web.template') def UL(lst): io = StringIO() io.write("") return io.getvalue() @deprecated(Version('Twisted', 15, 3, 0), replacement='twisted.web.template') def linkList(lst): io = StringIO() io.write("") return io.getvalue() @deprecated(Version('Twisted', 15, 3, 0), replacement='twisted.web.template') def output(func, *args, **kw): """output(func, *args, **kw) -> html string Either return the result of a function (which presumably returns an HTML-legal string) or a sparse HTMLized error message and a message in the server log. """ try: return func(*args, **kw) except: log.msg("Error calling %r:" % (func,)) log.err() return PRE("An error occurred.")