진지한 개발자

unzip 본문

IT/Python

unzip

제이_엔 2023. 8. 26. 19:20
728x90
import json, gzip
import shutil
tdc_gz = '/data001/jupyter-docker/jooeun.kim/mon/raw/integration-parser-v1_9_9_027fc400-f327-8e67-2fee-ac46c2111cda_6992502d-31eb-9081-c152-70de02e65ce1_gz-0.gz'
# with fs.open(tdc_gz) as s3fp:
with gzip.open(tdc_gz, 'rb') as f_in:
    with open('tdc.json', 'wb') as f_out:
        shutil.copyfileobj(f_in, f_out)
728x90