Skip to content
Newer
Older
100644 41 lines (33 sloc) 1.18 KB
d421c13 @mdipierro initial commit
mdipierro authored
1 """
2 web2py handler for isapi-wsgi for IIS. Requires:
3 http://code.google.com/p/isapi-wsgi/
4 """
5 # The entry point for the ISAPI extension.
6 def __ExtensionFactory__():
7 import os
8 import sys
9 path = os.path.dirname(os.path.abspath(__file__))
10 os.chdir(path)
11 sys.path = [path]+[p for p in sys.path if not p==path]
12 import gluon.main
13 import isapi_wsgi
14 application=gluon.main.wsgibase
15 return isapi_wsgi.ISAPIThreadPoolHandler(application)
16
17 # ISAPI installation:
18 if __name__=='__main__':
19 import sys
20 if len(sys.argv)<2:
21 print "USAGE: python isapiwsgihandler.py install --server=Sitename"
22 sys.exit(0)
23 from isapi.install import ISAPIParameters
24 from isapi.install import ScriptMapParams
25 from isapi.install import VirtualDirParameters
26 from isapi.install import HandleCommandLine
27
28 params = ISAPIParameters()
29 sm = [ ScriptMapParams(Extension="*", Flags=0) ]
30 vd = VirtualDirParameters(Name="appname",
31 Description = "Web2py in Python",
32 ScriptMaps = sm,
33 ScriptMapUpdate = "replace")
34 params.VirtualDirs = [vd]
35 HandleCommandLine(params)
36
d281acb @mdipierro fixws and 'new' button in grid query
mdipierro authored
37
ba93692 @mdipierro fixed issue 728, bug in languages, thanks pgergo
mdipierro authored
38
a608df5 @mdipierro removed unwanted whitespaces
mdipierro authored
39
d322ec5 @mdipierro fixed @//// in wiki and pep8 spacing
mdipierro authored
40
Something went wrong with that request. Please try again.