ok... thanks for the help so far :)<br><br>I&#39;ve managed to get it &#39;working&#39; by hashing out the __init__ under the Telnet Protocol class<br><br>class TelnetProtocol(recvline.HistoricRecvLine):<br>#&nbsp;&nbsp;&nbsp; def __init__(self, user):
<br>#&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; self.user = user<br><br>That will now allow me to connect to the &#39;server&#39; but it behaves in a different way to the SSH server in that if I type in one of my commands... to see the output and return to the prompt, I have to hit enter twice which then shows me 2 prompts
:(<br><br>oh for a nice simple example like the one for SSH in the O&#39;Reilly book :(<br><br>Andrew<br><br><div><span class="gmail_quote">On 8/8/07, <b class="gmail_sendername">Jean-Paul Calderone</b> &lt;<a href="mailto:exarkun@divmod.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
exarkun@divmod.com</a>&gt; 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 14:27:36 +0100, Andrew Roden &lt;<a href="mailto:andrew.roden@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">andrew.roden@gmail.com</a>&gt; wrote:<br>&gt;The answer is no I wasn&#39;t running it with twistd as I didn&#39;t need to with
<br>
&gt;the ssh one... having now run it with twistd I can see the exceptions it<br>&gt;throws but I have absolutely no clue how to go about rectifying them :(<br>&gt;&gt;From what I can make out the main issue is with no terminal size being set
<br>&gt;which from the demo_insults.tac looks like it&#39;s set in my class that deals<br>&gt;with connections associating it with insults.TerminalProtocol (eg. class<br>&gt;DemoProtocol(insults.TerminalProtocol): ) however, I am dealing with my
<br>&gt;connections in recvline as I don&#39;t want it to react on a per character basis<br>&gt;but rather a per line basis...<br>&gt;<br>&gt;*confused of england*<br>&gt;<br>&gt;Andrew<br>&gt;<br><br>The first traceback I see is this one:
<br><br>2007-08-08 09:46:39-0400 [twisted.internet.protocol.ServerFactory] Unhandled Error<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Traceback (most recent call last):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/python/log.py&quot;, line 36, in callWithContext
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return context.call({ILogContext: newCtx}, func, *args, **kw)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/python/context.py&quot;, line 59, in callWithContext<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 
self.currentContext().callWithContext(ctx, func, *args, **kw)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/python/context.py&quot;, line 37, in callWithContext<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return func(*args,**kw)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/internet/selectreactor.py&quot;, line 139, in _doReadOrWrite<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;why = getattr(selectable, method)()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--- &lt;exception caught here&gt; ---
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/internet/tcp.py&quot;, line 813, in doRead<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;protocol.makeConnection(transport)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/internet/protocol.py&quot;, line 333, in makeConnection
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.connectionMade()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/conch/telnet.py&quot;, line 732, in connectionMade<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.protocol.makeConnection(self)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/internet/protocol.py&quot;, line 333, in makeConnection
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.connectionMade()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/conch/telnet.py&quot;, line 795, in connectionMade<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.protocol.makeConnection(self)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/internet/protocol.py&quot;, line 333, in makeConnection
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.connectionMade()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/conch/insults/insults.py&quot;, line 416, in connectionMade<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.terminalProtocol = self.protocolFactory

(*self.protocolArgs, **self.protocolKwArgs)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exceptions.TypeError: __init__() takes exactly 2 arguments (1 given)<br><br>Python is really helpful here, omitting the class name which has the bad<br>__init__, but I guess you can track that down with a little effort (and
<br>there are probably only a small number of candidates).<br><br>The next one I see is this:<br><br>2007-08-08 09:46:39-0400 [TelnetTransport,0,<a href="http://127.0.0.1" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
127.0.0.1</a>] Unhandled Error<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Traceback (most recent call last):
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/python/log.py&quot;, line 51, in callWithLogger<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return callWithContext({&quot;system&quot;: lp}, func, *args, **kw)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/python/log.py&quot;, line 36, in callWithContext
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return context.call({ILogContext: newCtx}, func, *args, **kw)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/python/context.py&quot;, line 59, in callWithContext<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 
self.currentContext().callWithContext(ctx, func, *args, **kw)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/python/context.py&quot;, line 37, in callWithContext<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return func(*args,**kw)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--- &lt;exception caught here&gt; ---<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/internet/selectreactor.py&quot;, line 139, in _doReadOrWrite<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;why = getattr(selectable, method)()
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/internet/tcp.py&quot;, line 362, in doRead<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return self.protocol.dataReceived(data)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/conch/telnet.py&quot;, line 483, in dataReceived
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.negotiate(commands)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/conch/telnet.py&quot;, line 526, in negotiate<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmdFunc(bytes)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/home/exarkun/Projects/Twisted/trunk/twisted/conch/telnet.py&quot;, line 833, in telnet_NAWS
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.protocol.terminalProtocol.terminalSize(width, height)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exceptions.AttributeError: &#39;NoneType&#39; object has no attribute &#39;terminalSize&#39;<br><br>This may just be a consequence of the first one, so I&#39;d try resolving the
<br>first one before looking more at this.<br><br>Jean-Paul<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>