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
Post a Comment