Line-by-line streaming and conform to py script