I need to temporarily create an unpacked version of some files. I saw people doing zcat somefile.gz > /tmp/somefile in bash, so I made this simple function in python:
from subprocess import check_call def unzipto(zipfile, tmpfile): with open(tmpfile, 'wb') as tf: check_call(['zcat', zipfile], stdout=tf)
But the use of zcat and check_call seems hacked to me, and I was wondering if there is a more "puffic" way to do this.
thanks for the help
source share