The answer is no I wasn't running it with twistd as I didn't need to with the ssh one... having now run it with twistd I can see the exceptions it throws but I have absolutely no clue how to go about rectifying them :(
<br>From what I can make out the main issue is with no terminal size being set which from the demo_insults.tac looks like it's set in my class that deals with connections associating it with insults.TerminalProtocol (eg. class DemoProtocol(
insults.TerminalProtocol): ) however, I am dealing with my connections in recvline as I don't want it to react on a per character basis but rather a per line basis...<br><br>*confused of england*<br><br>Andrew<br><br>
<br><div><span class="gmail_quote">On 8/8/07, <b class="gmail_sendername">Jean-Paul Calderone</b> <<a href="mailto:exarkun@divmod.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
exarkun@divmod.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Wed, 8 Aug 2007 13:25:59 +0100, Andrew Roden <
<a href="mailto:andrew.roden@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">andrew.roden@gmail.com</a>> wrote:<br>>Hi<br>><br>>I'm pretty new to python which probably isn't helping, but I'm kind of stuck
<br>>with twisted telnet. I'm trying to build a couple of 'emulators' for some
<br>>simple router/switches just so that you can log on and run some 'standard'<br>>commands and get a 'standard' output for use elsewhere. I've managed to get<br>>an SSH version working with the massively helpful section in the O'Reilly
<br>>book but I cannot get the telnet version working. the script 'runs' with no<br>>errors, but it doesn't stay running and bind to port 23 giving me my telnet<br>>server. I enclose a zip with the ssh and the telnet versions, if anyone can
<br>>give me any pointers it would be massively appreciated (I haven't even<br>>attempted to add in the 'login' which is in the SSH version... so any help<br>>on that would be great too :) )<br><br>Are you using twistd to run it?
<br><br> $ twistd -noy telnet_server.py<br> Removing stale pidfile twistd.pid<br> 2007-08-08 08:31:05-0400 [-] Log opened.<br> 2007-08-08 08:31:05-0400 [-] twistd 2.5.0+r20987 (/usr/bin/python 2.4.3) starting up
<br> 2007-08-08 08:31:05-0400 [-] reactor class: <class 'twisted.internet.selectreactor.SelectReactor'><br> 2007-08-08 08:31:05-0400 [-] twisted.internet.protocol.ServerFactory starting on 23<br> 2007-08-08 08:31:05-0400 [-] Starting factory <
twisted.internet.protocol.ServerFactory instance at 0xb77f5fac><br> ...<br><br>After I connect to the port, it reports several tracebacks and drops the<br>connection.<br><br>Jean-Paul<br><br><br>_______________________________________________
<br>Twisted-Python mailing list<br><a href="mailto:Twisted-Python@twistedmatrix.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Twisted-Python@twistedmatrix.com</a><br><a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
</a><br></blockquote></div><br>