diff options
author | Rob Austein <sra@hactrn.net> | 2010-03-01 19:55:39 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2010-03-01 19:55:39 +0000 |
commit | fb3b5b1eac604a121bd03efc218dbe4710f715d4 (patch) | |
tree | 4377923500daf87a3b890cea5348db75c5119a70 /myrpki.rototill/wsgi-example.py | |
parent | 1a1835fa41afde0450ee52b6a86c19e8cf17d396 (diff) |
Reorganize, because otherwise we're going to have far too many scripts
for anybody to understand.
svn path=/myrpki.rototill/cherrypy-example.py; revision=3009
Diffstat (limited to 'myrpki.rototill/wsgi-example.py')
-rw-r--r-- | myrpki.rototill/wsgi-example.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/myrpki.rototill/wsgi-example.py b/myrpki.rototill/wsgi-example.py deleted file mode 100644 index 5ae8ad13..00000000 --- a/myrpki.rototill/wsgi-example.py +++ /dev/null @@ -1,27 +0,0 @@ -# $Id$ - -# Every WSGI application must have an application object - a callable -# object that accepts two arguments. For that purpose, we're going to -# use a function (note that you're not limited to a function, you can -# use a class for example). The first argument passed to the function -# is a dictionary containing CGI-style envrironment variables and the -# second variable is the callable object (see PEP333) - -# See http://pythonpaste.org/do-it-yourself-framework.html for a -# somewhat more complete introduction, although it's a lead-in to the -# Paste package which we might not want to use. - -def hello_world_app(environ, start_response): - status = '200 OK' # HTTP Status - headers = [('Content-type', 'text/plain')] # HTTP Headers - start_response(status, headers) - - # The returned object is going to be printed - return ["Hello World"] - -# Run server with this app on port 8000 if invoked as a script - -if __name__ == "__main__": - from wsgiref.simple_server import make_server - print "Serving on port 8000..." - make_server('', 8000, hello_world_app).serve_forever() |