Am 05.11.2013 um 13:25 schrieb Laurens Van Houtven <[email protected]>: > You probably want to read this: > > https://twistedmatrix.com/documents/current/core/howto/application.html This explains the echo service step by step, but I still do not know how to do it with twistd *web* . Looking at the source of the web plugin did not enlighten me. I tried: --- meteo.tac: --- application = service.Application('meteo') meteoService = internet.TCPserver(80, meteoFactory(), interface=some IP4') # interface='some IP 6') meteoService.setServiceParent(application) --- and changed my main module to --- … resource = RootWeatherPage() meteoFactory = Site(resource) #reactor.listenTCP(80, factory, interface='91.216.35.82') #reactor.listenTCP(80, factory, interface='2a02:d40:2:2::82') #reactor.run()… --- twisted does not start up. Interrupting it, gives "exceptions.ImportError: cannot import name meteoFactory" > > There's a number of ways you can use twistd web, for example with a tac file, > but personally I always opt for using a Twisted plugin, so you instead do > twistd mything :)
Axel --- PGP-Key:29E99DD6 ☀ +49 151 2300 9283 ☀ computing @ chaos claudius
_______________________________________________ Twisted-web mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
