Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (33 sloc) 1.17 KB
web2py handler for isapi-wsgi for IIS. Requires:
# The entry point for the ISAPI extension.
def __ExtensionFactory__():
import os
import sys
path = os.path.dirname(os.path.abspath(__file__))
sys.path = [path]+[p for p in sys.path if not p==path]
import gluon.main
import isapi_wsgi
return isapi_wsgi.ISAPIThreadPoolHandler(application)
# ISAPI installation:
if __name__=='__main__':
import sys
if len(sys.argv)<2:
print "USAGE: python install --server=Sitename"
from isapi.install import ISAPIParameters
from isapi.install import ScriptMapParams
from isapi.install import VirtualDirParameters
from isapi.install import HandleCommandLine
params = ISAPIParameters()
sm = [ ScriptMapParams(Extension="*", Flags=0) ]
vd = VirtualDirParameters(Name="appname",
Description = "Web2py in Python",
ScriptMaps = sm,
ScriptMapUpdate = "replace")
params.VirtualDirs = [vd]