Hello,<br><br>How to obtain the stderror?<br>chanel.SSHChannel has an interesting method extReceived, is it that?<br><br>On 9/8/07, <b class="gmail_sendername">Paul Swartz</b> <<a href="mailto:paulswartz@gmail.com">paulswartz@gmail.com
</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 9/8/07, Konrads Smelkovs <<a href="mailto:konrads.smelkovs@gmail.com">
konrads.smelkovs@gmail.com</a>> wrote:<br>> 1) I want to invoke(exec) a command with arguments from a SSH Conch client.<br>> The example suggests that arguments should be passed along with command, so<br>> to invoke 'ls -l', one would pass
common.NS('ls -l'). What to do about<br>> arguments that have spaces? Should I slash-escape them?<br><br>Commands are executed with the -e argument of your shell. You can<br>slash-escape spaces or quote them; either one should work.
<br><br>> 2) How to obtain the retcode from an exec'ed command?<br><br>If the server supports it, it sends a 'exit-status' request to the<br>channel with a uint32 encoded exit code. If it exits with a signal,
<br>an 'exit-signal' message is sent with format:<br> string signal name<br> bool core dumped<br> string error message<br> string language<br><br>HTH,<br>-p<br><br>_______________________________________________
<br>Twisted-Python mailing list<br><a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br><a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Konrads Smelkovs<br>Applied IT sorcery.