Python Forum

Full Version: Python to IIS 8?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good day, is there a way to move a site from a python web server (compiled in python) to IIS 8?
Under the section “Setting Up Windows Environment For Python”, what are the system environment variables?
Environment Variables are available for all programs you run.
Programs look them up, if needed.

The variable PYTHONPATH seems to point to the webroot, where the Python files are.
The WSGI_HANDLER is points to your app.

from flask import Flask


app = Flask(__name__)
# this is the app object, where
# the HANDLER connects


@app.route('/')
def root():
    return 42


# this following code
# is not executed, if it's started
# by WSGI.

if __name__ == '__main__':
    app.run()
If this file is called foo.py, then the value of WSGI_HANDLER is foo.app.
it seems I hit a sang in the instructions. The WfastCGI 2.1 gateway…can no longer be downloaded? The Web Installer points to a location that is no longer available, and the direct link point to CodePlex which is gone? do you know where I can download the file(s)?

My guess would be to download “FastCGI for IIS” then install Python 3.x separately? Where would I go from there? would the instructions be good beyond that point?

Also what would the “Variable Name” and “Variable Path” be when editing the system variables?