@@ -0,0 +1,2116 @@
+#%0A# Copyright (C) 2012-2015 Craig Hobbs%0A#%0A# Permission is hereby granted, free of charge, to any person obtaining a copy%0A# of this software and associated documentation files (the %22Software%22), to deal%0A# in the Software without restriction, including without limitation the rights%0A# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0A# copies of the Software, and to permit persons to whom the Software is%0A# furnished to do so, subject to the following conditions:%0A#%0A# The above copyright notice and this permission notice shall be included in all%0A# copies or substantial portions of the Software.%0A#%0A# THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0A# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE%0A# SOFTWARE.%0A#%0A%0Aimport argparse%0Afrom wsgiref.simple_server import make_server%0A%0A%0Adef main():%0A%0A    # Command line arguments%0A    parser = argparse.ArgumentParser()%0A    parser.add_argument('file',%0A                        help='a Python file that contains the WSGI application object')%0A    parser.add_argument('-a', dest='app', default='application',%0A                        help='the name of the WSGI application callable (default is %22application%22)')%0A    parser.add_argument('-p', type=int, dest='port', default=8080,%0A                        help='WSGI service port (default is 8080)')%0A    args = parser.parse_args()%0A%0A    # Execute WSGI application file%0A    application_globals = %7B%7D%0A    with open(args.file) as wsgi_file:%0A        exec(compile(wsgi_file.read(), args.file, 'exec'), application_globals) # pylint: disable=exec-used%0A%0A    # Serve the WSGI application%0A    print('serving on port %7B0%7D...'.format(args.port))%0A    make_server('', args.port, application_globals%5Bargs.app%5D).serve_forever()%0A%0A%0Aif __name__ == '__main__':%0A    main()%0A

add __main__.py