컴퓨터과학
Python 2.x 에서 한글 경로에 문제가 발생하는 경우
코딩펀
2012. 3. 3. 17:58
Pyscipter의 코드 상에서 한글 경로를 사용할 때 다음과 같은 문제가 발생하는 경우
Python 2.x 의 LIB 폴더의 site.py 파일을 다음과 같이 수정한다.
수정전 ============
if 0:
# Enable to support locale aware default string encodings.
import locale
loc = locale.getdefaultlocale()
if loc[1]:
encoding = loc[1]
수정후 ============
if 1:
# Enable to support locale aware default string encodings.
import locale
loc = locale.getdefaultlocale()
if loc[1]:
encoding = loc[1]