# HG changeset patch # User Jeff Hammel # Date 1388175198 28800 # Node ID 6af220013aa126aa70a769555a5e426a1dd29cfa # Parent 0bf52646061b8b1d633118693f471221bb23eff8 example/persona.py setup.py diff -r 0bf52646061b -r 6af220013aa1 example/persona.py --- a/example/persona.py Fri Dec 27 11:24:23 2013 -0800 +++ b/example/persona.py Fri Dec 27 12:13:18 2013 -0800 @@ -22,11 +22,18 @@ def __call__(self, environ, start_response): method = environ['REQUEST_METHOD'] if method == 'GET': - start_response("200 OK", [('Content-Type', 'text/html'), - ('Content-Length', str(len(self.page)))]) + content_type = 'text/html' body = self.page elif method == 'POST': - body = '\n'.join([]) + content_type = 'text/plain' + body = '\n'.join(['%s: %s' % (key, environ[key]) + for key in sorted(environ.keys())]) + print body + else: + content_type = 'text/plain' + body = 'Try GET or POST to do something interesting (How did you get here?)' + start_response("200 OK", [('Content-Type', content_type), + ('Content-Length', str(len(body)))]) return [body] def main(args=sys.argv[1:]): diff -r 0bf52646061b -r 6af220013aa1 setup.py --- a/setup.py Fri Dec 27 11:24:23 2013 -0800 +++ b/setup.py Fri Dec 27 12:13:18 2013 -0800 @@ -23,9 +23,7 @@ 'PyBrowserID', 'WebOb', ], - dependency_links=[ - 'http://svn.pythonpaste.org/Paste/trunk#egg=Paste', - ], + dependency_links=[], entry_points=""" """, )