[Twisted-Python] running several services from a single app

Aljoša Mohorović aljosa.mohorovic at gmail.com
Tue Mar 29 03:46:11 EDT 2011

On Mon, Mar 28, 2011 at 7:44 PM, Allen Short <washort at twistedmatrix.com> wrote:
> Get rid of 'application1' and 'application2' and just create a single one
> named 'application' , delete the last three lines, and this code will work
> just fine as a .tac file. You only need one call to 'Application' per

is it possible to setup this without .tac file?
i don't know howto create an exe file using cx_freeze from .tac file.

is there a way to tell reactor to run application and services defined
so i can skip .tac file and just execute python file?
maybe something similar to this:
application = service.Application("Services")

factory1 = protocol.ServerFactory()
factory1.protocol = Protocol1
internet.TCPServer(8000, factory1).setServiceParent(application)

factory2 = protocol.ServerFactory()
factory2.protocol = Protocol2
internet.TCPServer(9000, factory2).setServiceParent(application)

# howto make reactor do something like this:

More information about the Twisted-Python mailing list