On Mon, Jul 25, 2011 at 1:48 PM, Steven W. Orr <ste...@syslang.net> wrote:
> The general solution would be to run an
> expect script that would simply act as a passthrough to guarantee that
> whatever I run would think it had a tty, and would therefore be line buffered
> by default instead of fully buffered. I know it would look something like 
> this:
>
> #! /usr/bin/expect --
> spawn something
> interact
>
> It's that middle line I don't know how to craft.

I think you want:

    eval spawn $argv

as the middle line. This should work most of the time -- you'll have
to be careful of quoting since this will "eat" a layer of quotes.

I think an even more general-purpose method would be to use the -t
flag of ssh (if you're calling it directly) or something like
paramiko.Channel.get_pty().

-Brian
_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to