MCPcopy Index your code
hub / github.com/RustPython/RustPython / demo_app

Function demo_app

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

getvalueMethod · 0.95
StringIOClass · 0.90
sortedFunction · 0.85
reprFunction · 0.85
printFunction · 0.50
itemsMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected