Using Python and paramiko, I have the following code
(stdin, stdout, stderr) = self.client.exec_command(x)
b = stderr.readlines()
if b:
    for i in b:
        print i
a = stdout.readlines()
if a:
    for i in a:
        print i
The command I run takes ~15 minutes and outputs a steady update to stdout, but it won't print on the host side until it's completed.
Is there a way to get the live stdout as opposed to waiting? Thanks.
 
    