2
`을 통해 꼬리 -F``에서 읽기 :실패는 내가 다음 스크립트 <code>parse.py</code>와 함께 성장하는 CSV 파일을 구문 분석하려고 stdin`
이import csv
import sys
reader = csv.reader(sys.stdin)
for row in reader:
print row
해당 명령 줄 tail -F log | python parse.py
입니다.
그럼 log
에 행을 추가하려고 시도하면 echo "something" >> log
이됩니다.
그러나 parse.py
인쇄 할 항목이 없습니다.
내 스크립트에 어떤 문제가 있습니까?
관련 질문 http://stackoverflow.com/questions/1544050/force-another-programs-standard-output-to-be-unbuffered-using-python –