Frustrating couple of hours here trying to get Twisted to either use a serial port or a TCP port to test the EFT server. Mostly it's frustrating because the API documentation doesn't tell you what methods are doing, what they return, what their arguments should be, how to deal with the results to accomplish common tasks, etceteras. It just gives you a bare call signature.
Adding to the frustration is that I know I've done what I'm trying to do before, I just can't find the bloody code any more.
In particular, after calling reactor.connectTCP, you get a tcp.TCPConnector instance. What I want to get a reference to is the connected protocol instance so that I can start sending messages, but darned if I can see how to get it. I would imagine that I'll have to register for a deferred callback somewhere, but I just can't find it anywhere.
While I'm bitching about code; the logging module loggers have no documented method by which to retrieve the current set of handlers for a logger. There's add and remove methods, but you have to already have a reference to the handler to remove it from the logger's list, and you don't have the reference if you've done a default setup. Blah.
Pingbacks are closed.