Hi All,

I'm very close to having web2py running under IIS using isapi-wsgi.  I  
have included below the isapi-wsgihandler.py file I created (see  
below).  It's based on web2py's own wsgihandler.py and has been  
modified to include code needed for isapi-wsgi.  I'll post to the FAQ  
once I have everything working.

That said, I have encountered 1 problem not related to web2py.  I've  
searched everywhere for a solution but can't find one which is why I'm  
posting this message.  The problem I have is that python cannot load  
the module _socket.  The module is available in C:\Python26\DLLs\ and  
that directory is included in the system path.

Any python-win32 pros out there know why the module cannot be imported  
and what I must to fix the problem?

Thanks,
-KIRBY




#!/usr/bin/python
"""
This is a ISAPI-WSGI handler for IIS

"""

import sys, os

if hasattr(sys, "isapidllhandle"):
     import win32traceutil

sys.path.insert(0,'')
path=os.path.dirname(os.path.abspath(__file__))
if not path in sys.path: sys.path.append(path)
os.chdir(path)

import gluon.main
from gluon.contrib.wsgihooks import ExecuteOnCompletion2, callback

application=ExecuteOnCompletion2(gluon.main.wsgibase, callback)

## or
# application=gluon.main.wsgibase_with_logging

import isapi_wsgi
# The entry points for the ISAPI extension.
def __ExtensionFactory__():
     return isapi_wsgi.ISAPIThreadPoolHandler(application)

if __name__=='__main__':
     # If run from the command-line, install ourselves.
     from isapi.install import *
     params = ISAPIParameters()
     # Setup the virtual directories - this is a list of directories our
     # extension uses - in this case only 1.
     # Each extension has a "script map" - this is the mapping of ISAPI
     # extensions.
     sm = [
         ScriptMapParams(Extension="*", Flags=0)
     ]
     vd = VirtualDirParameters(Name="web2py",
                               Description = "ISAPI-WSGI  
ISAPISimpleHandler web2py site",
                               ScriptMaps = sm,
                               ScriptMapUpdate = "replace"
                               )
     params.VirtualDirs = [vd]
     HandleCommandLine(params)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to