[Twisted-Python] Re: Running commands (ssh) from a GUI client

Raúl Gómez C. nachogomez at gmail.com
Thu Oct 11 11:53:54 EDT 2007


Well Marcin, I think that looks pretty much close to what I want to achieve,
so I haven't found any working example of this (yet :s). Can you share your
code with us?

On 10/11/07, Marcin Kasperski <Marcin.Kasperski at softax.com.pl> wrote:
>
>
> I will allow myself to add to the question:
>
> Does there exist any example of SSH connection which instead of just
> running a command, allows interaction with remote application (feeding
> its stdin, reading its stdout)?
>
> My personal use case is 'remote UCI engine' - application which logins
> via ssh to remote machine, spawns fruit (or wine rybka.exe, or
> whatever) there, and then forwards anything obtained on (local) stdin
> to this app stdin and forwards anything obtained from remote app to
> (local) stdout. Plus, in case of disconnect, relogin-s, restarts the
> app and resends initialization commands.  Just a way to bind Fritz run
> on laptop to the engine run on stronger server.
>
> I even managed to write more-or-less working code, but it turned out
> to be so horrible mess, that I gave up an idea of maintaining it in a
> long term...
>


Paul, I'm working right now with the code you've send, and there is an error
that I can't understand, when the execution reach the line "
self.connection.runCommand(deferred, cmd, *args)" in the
CommandClientFactory class, it throws an error saying:

"TypeError: unbound method runCommand() must be called with ClientConnection
instance as first argument (got Deferred instance instead)"


...but the runCommand method definition of ClientConnection class is like
this: "def runCommand(self, d, command, *args):", so it looks OK to me (by
this I mean, that it looks like it want to receive a deferred instance at
first arg), any clue on this???
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20071011/75c10e59/attachment.htm 


More information about the Twisted-Python mailing list