개발 38

python subprocess run이 안끝난다면?

subprocess.run을 timeout 옵션을 주어 돌렸는데도 끝나지 않는다면The timeout argument is passed to Popen.communicate(). If the timeout expires, the child process will be killed and waited for. The TimeoutExpired exception will be re-raised after the child process has terminated. 요거 때문에 그렇다. child process들이 끝날때까지 다 기다리느라구 안끝나는거임.. 그럴때는 그냥popen으로 proc 생성하고 communicate에 timeout 줘서 돌린담에 TimeoutExpired 에러 났을때 proc.kill(..

개발/Python 2019.02.01

[vim] 좋은 빔 플러그인(vim-jsbeautify) 발견!!!!!!

파일의 들여쓰기를 자동 수정해주는 플러그인을 발견했당들여쓰기가 엉망으로 되어있는 몇천 라인짜리 파일의 인덴테이션을 수작업으로 고치는 일은 불가능에 가깝다고 생각하는데.. 아무래도 들여쓰기 폭이 너무 좁거나/넓거나 정해놓은 코드 컨벤션에 맞지 않는 파일은코드의 가독성을 위해서라도 한번 이쁘게 다듬어놔주면 좋다 그래서 찾아낸 플러그인이 vim-jsbeautify이다. Github: https://github.com/maksimr/vim-jsbeautify pathogen을 통한 설치를 권장한다. (왜냐면 젤 쉬움) Installation cd ~/.vim/bundle git clone https://github.com/maksimr/vim-jsbeautify.git cd vim-jsbeautify && gi..

개발 2016.01.08