728x90
반응형
간혹 nifi 같은 곳에서 파이썬을 연동하여 사용할 때
플로우 내에서 파이썬 코드 실행중 compile 에러가 나면
어디서 에러가 나는지 로그조차 찍히지 않으면서 플로우가 죽어버리는 경우가 있다.
그럴 때 에러가 나는 파일에
python -m py_compile script.py
의 명령어를 사용하면
해당 파이썬 파일의 compile 에러를 찾아낼 수 있다.
How can I check the syntax of Python script without executing it?
I used to use perl -c programfile to check the syntax of a Perl program and then exit without executing it. Is there an equivalent way to do this for a Python script?
stackoverflow.com
728x90
반응형