Add a todo + some commented debug lines + foo_pep333.py enhancement
This commit is contained in:
parent
d3c9e2de42
commit
7004f544e4
4 changed files with 24 additions and 2 deletions
|
|
@ -1,8 +1,21 @@
|
|||
import sys
|
||||
import os
|
||||
import time
|
||||
from pprint import pformat
|
||||
|
||||
def entrypoint(env, start_response):
|
||||
write_body = start_response("200 OK", [('Content-type', 'text/plain')])
|
||||
write_body('Hello world !')
|
||||
return ['Hello world !']
|
||||
|
||||
if not "wsgi.input" in env:
|
||||
raise ValueError("Given environ does not contain any 'wsgi.input' key !")
|
||||
data_in = env["wsgi.input"]
|
||||
#for l in data_in:
|
||||
# write_body("POST data line : %s" % repr(l))
|
||||
#data = data_in.readlines()
|
||||
while True:
|
||||
data = data_in.read(98)
|
||||
write_body("POST data : %s\n====\n" % repr(data))
|
||||
if not data:
|
||||
break
|
||||
write_body("Environ data :\n'%s'\n====\n" % pformat(env))
|
||||
return ['Hello world !\n']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue