Good day, everyone:<br><br>I&#39;m trying to learn Python and Twisted at the same time and having fun (mostly).<br><br>I&#39;m writing an application that is collecting data from multiple sources, filtering the data, and providing it to users through a Telnet server.  I can set up a polling loop for the server but I can&#39;t figure out how to get send the data to users connected to my server.<br>
<br>I thought I&#39;d put the server in a thread and use a Queue to send data to it.  But, I could do the work within the server application...<br><br>The server I&#39;m playing with, including the polling loop, is:<br><br>
from twisted.conch.telnet import StatefulTelnetProtocol<br>from twisted.internet import reactor, protocol<br><br>class TelnetEcho(StatefulTelnetProtocol):<br><br>    def lineReceived(self, data):<br>        print &quot;Type of self: &quot; + str(type(self))<br>
        data = data.rstrip(&#39;\n\r&#39;)<br>        self.sendLine(&quot;Unrecognized command: %r\r&quot; % (data,))<br><br><br>def checkforspots():<br>    print &quot;running checkforspots()&quot;<br>    reactor.callLater(1.0,checkforspots)<br>
<br>def createTelnetServer():<br>    factory = protocol.ServerFactory()<br><br>    instance = TelnetEcho<br>    factory.protocol = instance<br><br>    port = reactor.listenTCP(8023,factory)<br>    print &quot;Listening on port 8023&quot;<br>
<br>    print &quot;Type of port: &quot; + str(type(port))<br>    checkforspots()<br><br>    return port<br><br>if __name__ == &quot;__main__&quot;:<br>    reactor.callWhenRunning(createTelnetServer)<br>    reactor.run()<br>
<br><br>Any suggestions greatly appreciated.  I&#39;ve been unable to find anything using my &quot;google-fu&quot; on this issue - I&#39;m stuck.<br><br>Thanks.<br><br>Mark Bailey<br>