[Twisted-Python] MetaInterface call error

Rita Díaz y/o Rodrigo Benenson rdrb at 123.cl
Sun Oct 19 17:43:16 EDT 2003


Hi!,

the log crash problem was solved as indicated (thanks !), just had to fix
the calls to thread.start_new_thread(reactor.run, ()).
I'm still working to get Khashmir passing the unit tests (again, I suppose).
After some grumble grumbling I discovered the following funny situation
(copied from another screen):


>>> import airhook
>>> a = airhook.AirhookConnection
>>> a
<class 'airhook.AirhookConnection'>
>>> b = a()
TypeError: __call__() takes at least 2 arguments (1 given)

Why __call__? __init__ should be called !

AirhookConnection is defined as:

class AirHookConnection(protocol.ConnectedDatagramProtocol,
interfaces.IUDPConnectedTransport):
   def __init__(self):
      blablblah

Then, in a inspired moment I discovered:
>>> type(a)
<class 'twisted.python.components.MetaInterface'>

Could someone explain to me what it means, and how should I interpret the
"__call__" problem in this context ?
Do I have to register the interface ? or something like that ? Thanks.

RodrigoB.

PS: I had readed that PB wanted to be able to run over AirHook, Khashmir has
an AirHook protocol implementation...






More information about the Twisted-Python mailing list