How can I read data from a big remote file using subprocess and ssh?
How can I read data from a big remote file using subprocess and ssh?
import subprocess
ssh = subprocess.Popen(['ssh', 'user@host', 'cat', 'path/to/file'],stdout=subprocess.PIPE)
for line in ssh.stdout:line # do stuff