[Twisted-Python] How to ... in Conch?

Konrads Smelkovs konrads.smelkovs at gmail.com
Sun Sep 9 08:08:43 EDT 2007


Hello,

How to obtain the stderror?
chanel.SSHChannel has an interesting method extReceived, is it that?

On 9/8/07, Paul Swartz <paulswartz at gmail.com> wrote:
>
> On 9/8/07, Konrads Smelkovs <konrads.smelkovs at gmail.com> wrote:
> > 1) I want to invoke(exec) a command with arguments from a SSH Conch
> client.
> > The example suggests that arguments should be passed along with command,
> so
> > to invoke 'ls -l', one would pass common.NS('ls -l'). What to do about
> > arguments that have spaces? Should I slash-escape them?
>
> Commands are executed with the -e argument of your shell.  You can
> slash-escape spaces or quote them; either one should work.
>
> > 2) How to obtain the retcode from an exec'ed command?
>
> If the server supports it, it sends a 'exit-status' request to the
> channel with a uint32 encoded exit code.  If it exits with a signal,
> an 'exit-signal' message is sent with format:
>     string signal name
>     bool core dumped
>     string error message
>     string language
>
> HTH,
> -p
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>



-- 
Konrads Smelkovs
Applied IT sorcery.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20070909/321e7a27/attachment.htm 


More information about the Twisted-Python mailing list