Twisted Application getting name

174 Views Asked by At

I am trying to set the name of the application in twisted and would like to get the name later on using the variable "app"

app = service.Application("TestingApp")

I could not find anything like "app.getName()". Any help appreciated?

1

There are 1 best solutions below

3
On

The name is available via the IService.name attribute:

>>> from twisted.application.service import Application, IService
>>> IService(Application("Some name")).name
'Some name'
>>>