[Twisted-Python] The Twisted registration form

Chris Armstrong carmstro at twistedmatrix.com
Tue Apr 2 15:30:46 EST 2002

On Tue, Apr 02, 2002 at 10:15:58AM -1000, cpaul at telemetrybox.org wrote:
> On Tue, Apr 02, 2002 at 01:54:14PM -0600, Chris Armstrong wrote:
> > It's a pain to deploy Widgets-based apps as of yet. We're planning on
> > doing something that will allow you to just throw any Resource-defining
> > modules in a directory and have it show up on your server, but we haven't
> > figured out exactly how it will work yet.
> > 
> > Right now you either have to be able to instantiate a widget through
> > telnet or manhole interfaces on an already-running server, or create
> > your own .tac file that instantiates a web.server.Site with a Widget in it.
> Can someone show an example of a .tac file that does just that?

here's a simple one off the top of my head:

-- snip --

from twisted.internet import app
from twisted.web import server

import my_web_app

application = app.Application("my_web_app")
s = server.Site(my_web_app.MyGadget())
application.listenTCP(80, s)

-- snip --

You can also look in Twisted/doc/examples/; for example, bugs.tac is a
webwidgets app.

More information about the Twisted-Python mailing list