[paramiko] Interactive Programs with 'exec_command'
Robey Pointer
robey at lag.net
Tue Nov 20 12:46:32 PST 2007
On 12 Nov 2007, at 17:48, Pepe Barbe wrote:
> I am curious of what should I expect from Paramiko when I issue and
> exec_command on a channel object, and the command itself is quite
> interactive. I've been able to interact with the command using
> channel.send but after I supposedly exited the program, the channel
> doesn't close nor I get the exit_status from the server. Is this the
> normal behavior?
The command may not close the channel until you close the "stdin"
pipe. If you close "stdin", you may get the remote command to close
its own "stdout" and exit.
It's also possible that "stdout" isn't closed because there's data
waiting for you to read it.
robey
More information about the paramiko
mailing list