[Python] 파이썬 2.7.x 버전 UTF8 인코딩 설정 Python

파일을 하나 만든다.

{python_home}/Lib/sitecustomize.py
=====================
import sys
sys.setdefaultencoding('utf-8')
=====================


자신이 작성하고자 하는 프로그램 코드의 첫줄에 다음 코드를 입력한다.
example.py
=====================
#-*- coding: utf-8 -*-

print("인코딩 : "+sys.getdefaultencoding())
=====================

인코딩 : utf-8

이라고 뜨는지 확인한다.



통계 위젯 (블랙)

1336
546
360317

GoogleAdsenseResponsive

Cluster map