[Twisted-Python] Insults, Can't write from connectionMade?
Hello, twisted Twisted coders. I am trying to get familiarised with twisted.conch.insults. I've run into some behaviour I cannot explain. Attached is a .tac including the following excerpt: class MyTerminalProtocol(insults.TerminalProtocol): width = 80 height = 24 def connectionMade(self): self.terminalSize(self.width, self.height) self.terminal.write(" world\n") def terminalSize(self, width, height): self.width, self.height = width, height self.terminal.eraseDisplay() self.terminal.write("Hello,") When a connection is made, the screen is cleared and "Hello," is written, but " world\n" is not (or at least it never appears on the terminal). Why is "world\n" not written? Oddly (or perhaps revealingly for someone with more clues than me), when in a previous version I did not use TelnetTransport and TelnetBootstrapProtocol, I was able to write just fine from connectionMade. TIA for a liberal and violent application of the clue stick. Mike.
participants (2)
-
Jean-Paul Calderone
-
Mike Pelletier