Notice
Recent Posts
Recent Comments
Link
- Arawn's Dev Blog
- Outsider's Dev Story
- Toby's Epril
- Benelog
- NHN 개발자 블로그
- SK 플래닛 기술 블로그
- OLC CENTER
- 소프트웨어 경영/공학 블로그
- 모바일 컨버전스
- KOSR - Korea Operating System …
- 넥스트리 블로그
- 리버스코어 ReverseCore
- SLiPP
- 개발자를 위하여... (Nextree 임병인 수석)
- "트위터 부트스트랩: 디자이너도 놀라워할 매끈하고 직관…
- Learning English - The English…
- real-english.com
- 'DataScience/Deep Learning' 카테…
- Deep Learning Summer School, M…
- Deep Learning Courses
목록2018/01/26 (1)
민서네집
python 프로그램 redirect 시 파일 쓰기 지연의 해결책
python 프로그램을 Windows 운영체제의 명령 프롬프트에서 실행하면서 redirect 시켜서 파일에 저장할 때 쓰기가 지연되는 문제가 있다. 성능을 위해서 일부러 그랬을텐데, tail 프로그램으로 로그를 확인하는데는 매우 불편했다. 여기에 대해서 해결책을 몇가지 찾았다. https://stackoverflow.com/questions/21981665/redirect-output-without-delay-to-a-file-in-python For every iteration, you must add this.sys.stdout.flush() A simple solution is to add a -u option for python command to force unbuffered stdin, std..
Python
2018. 1. 26. 01:00