MCPcopy Index your code
hub / github.com/python/cpython / demo_app

Function demo_app

Lib/wsgiref/simple_server.py:133–142  ·  view source on GitHub ↗
(environ,start_response)

Source from the content-addressed store, hash-verified

131
132
133def demo_app(environ,start_response):
134 from io import StringIO
135 stdout = StringIO()
136 print("Hello world!", file=stdout)
137 print(file=stdout)
138 h = sorted(environ.items())
139 for k,v in h:
140 print(k,'=',repr(v), file=stdout)
141 start_response("200 OK", [('Content-Type','text/plain; charset=utf-8')])
142 return [stdout.getvalue().encode("utf-8")]
143
144
145def make_server(

Callers

nothing calls this directly

Calls 4

getvalueMethod · 0.95
StringIOClass · 0.90
itemsMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…