파이썬 모듈

2022. 6. 13. 14:25프로그래밍 언어/파이썬

zipfile 해제

import zipfile

source_file = '압축을 풀 파일명.zip'

with zipfile.ZipFile(source_file, 'r') as zf:
	zipinfo = zf.infolist()
	for info in zipinfo:
		info.filename = info.filename.encode('cp437').decode('euc-kr')
		zf.extract(info)

 

'프로그래밍 언어 > 파이썬' 카테고리의 다른 글

[Python] 파이썬 중급 (1)  (0) 2022.07.28
파이썬 자료구조  (0) 2022.04.14