RE: [Twisted-Python] How to write a simpletelnet client?

I didn't expect that one must handle control codes (your function reponseFunct), I expected the protocol to handle that for me, but anyway, that was no problem (i.e. you solved it before). And with your code I could even switch off the echo (your next thread).
You don't actually have to do this. You can implement iac_DO, iac_DONT, iac_WILL, and iac_WONT to handle feature negotiation.
You can also use twisted.conch.telnet, which presents a slightly more complete API for feature negotiation.
Thank you, I'll look into it. It's better to use ssh anyway.
Factory's don't have protocol instances, in general. A factory is responsible for creating between zero and an unlimited number >of instances of a protocol, as they are demanded by established connections.
Protocol.connectionMade is provided as a hook for application-level logic. You may want to send your commands from that method. >When it is invoked, you will have a transport.
Thank you. I don't understand how connectionMade would help me here - I use it to switch off ECHO, but everything else is in dataReceived to react on prompts. And I've telnet_Command to issue a command (i.e. I queue it while there's no connection), but if I use the Protocol in a Factory, I can't get my hands on it. Perhaps I simply shouldn't use a Factory. I guess the UDP code you're discussing with Drake Smith will help me further, his task seems similar to mine. Best regards, Henning Hraban Ramm Südkurier Medienhaus / MediaPro Support/Admin/Development Dept.
participants (1)
-
Henning.Ramm@mediapro-gmbh.de