Hi Folks,
I'm trying to move from old-school CGI to WSGI in an attempt to
improve performance and concurrency.
I've set up a virtualenv/iwhelper directory structure according to the
ISAPIWSGIHelper documentation (
http://pypi.python.org/pypi/
ISAPIWSGIHelper/0.1.1).
I would really like to get some Flask example application up and
running so I can get an idea of how to hook IIS7 up to Flask and get a
feel for how I need to restructure *my* Python script to work as an
"application," etc.
I could use some hand-holding here. I've downloaded the application
that powers Flask's web site, and can use that as my test subject, but
if you know of something better to use, I'll go with that.
So iwhelper gives me this appinit.py (below), but I don't know how to
modify it for my purposes. Could someone give me a hand?
Thanks,
Jamie
#####################################################
# This setup assumes you have the isapi-wsgi directory installed
# in the root directory of a virtualenv:
#
# ..\myproj-venv
# - isapi-wsgi
# - Lib
# - Scripts
#
# If you have isapi-wsgi installed in a different location or are not
using
# a virtualenv, you CAN SAFELY MODIFY OR DELETE THE FOLLOWING TWO
LINES.
from iwhelper.utils import prepend_site_dir
prepend_site_dir(__file__, '..', 'Lib', 'site-packages')
# replace these two lines with the necessary imports to instantiate
your
# WSGI application and assign said application to __wsgiapp__.
from iwhelper.utils import hwapp
__wsgiapp__ = hwapp