Beispiel #1
0
 def tick(self):
     try:
         CherryPyWSGIServer.tick(self)
     except socket.error, x:
         if x[0] == errno.EINTR or x[0] == errno.EAGAIN:
             return
         raise
Beispiel #2
0
 def __init__(self):
     conf = cherrypy.config.get
     server.__init__(
         self,
         (conf("server.socketHost"), conf("server.socketPort")),
         wsgiApp,
         conf("server.threadPool"),
         conf("server.socketHost"),
         config=cherrypy.config,
     )
 def __init__(self):
     conf = cherrypy.config.get
     wsgi_app = wsgiApp
     if conf('server.environment') == 'development':
         try:
             from paste.evalexception.middleware import EvalException
         except ImportError:
             pass
         else:
             wsgi_app = EvalException(wsgi_app, global_conf={})
             cherrypy.config.update({'server.throw_errors':True})
     bind_addr = (conf('server.socket_host'), conf('server.socket_port'))
     CherryPyWSGIServer.__init__(self, bind_addr, wsgi_app,
         conf("server.thread_pool"), conf("server.socket_host"),
         request_queue_size = conf("server.socket_queue_size"))
Beispiel #4
0
        pass

    @soapmethod(String, Integer, DateTime)
    def multiParam(self, s, i, dt):
        # new
        pass

    @soapmethod(_returns=String)
    def returnOnly(self):
        # new
        return 'howdy'

    @soapmethod(String,
                _returns=String,
                _soapAction="http://sample.org/webservices/doSomething")
    def doSomethingElse(self, s):
        return s


if __name__ == '__main__':

    from cherrypy._cpwsgiserver import CherryPyWSGIServer

    addr = ('127.0.0.1', 9753)
    log_debug(True)
    log_exceptions(True)
    server = CherryPyWSGIServer(addr, InteropService())
    print 'Starting interop server at -- %s:%s' % addr

    server.start()
Beispiel #5
0
        pass
        
    @soapmethod(String,Integer,DateTime)
    def multiParam(self,s,i,dt):
        # new
        pass
        
    @soapmethod(_returns=String)
    def returnOnly(self):
        # new
        return 'howdy'
        
    @soapmethod(String,_returns=String,_soapAction="http://sample.org/webservices/doSomething")
    def doSomethingElse(self,s):
        return s
        
if __name__ == '__main__':
    
    from cherrypy._cpwsgiserver import CherryPyWSGIServer
 
    addr = ('127.0.0.1',9753)
    log_debug(True)
    log_exceptions(True)
    server = CherryPyWSGIServer(addr,InteropService())
    print 'Starting interop server at -- %s:%s'%addr

    server.start()
    
        
        
Beispiel #6
0
        os.chdir(r"C:\Program Files\ANSYS Inc\v145\icemcfd\win64_amd\bin")
        p = Popen(["icemcfd.bat", r"C:\Users\ansys\Desktop\load.rpl"],
                  stdin=PIPE,
                  stdout=PIPE,
                  stderr=PIPE)
        output, err = p.communicate()
        if len(err) > 0:
            return err
        # copy to intended destiny
        mshOutputPath = cgnsFileFullPath.replace(".cgns", ".msh")
        p = Popen(['copy', '/Y', r"C:\temp\output.msh", mshOutputPath],
                  stdin=PIPE,
                  stdout=PIPE,
                  stderr=PIPE,
                  shell=True)
        output, err = p.communicate()
        if len(err) > 0:
            return err
        return mshOutputPath


soap_app = soaplib.core.Application([icemService], 'tns', name='icemService')
application = wsgi.Application(soap_app)

if __name__ == '__main__':
    from cherrypy._cpwsgiserver import CherryPyWSGIServer
    server = CherryPyWSGIServer(('0.0.0.0', 8080),
                                wsgi_app=application,
                                timeout=10000000)
    server.start()