python - Having issues reading a remote file while using subprocess -



python - Having issues reading a remote file while using subprocess -

i next , not able read file "word_file.txt" line line..

f = subprocess.popen(["../../../script.sh", "cat", "word_file.txt"], stdout=subprocess.pipe) out = f.stdout.readline() print "......." in f.stdout.readline(): print "i>>>>>>>>>>>",

the gets printed, prints every single character separately.

so, tried doing..

for in f.stdout.readline().split('\n'): print "i>>>>>>>>>>>",

read remote file using python subprocess , ssh? - addresses same issue solution isnt working me.

but not seem right do. no output..

use iter readline read each total line:

for in iter(f.stdout.readline,"")

python file subprocess cat

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -