Created
April 6, 2015 17:09
-
-
Save jbernhard/274faa1ea833fff7a522 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
# Read a gzipped file from within Python. | |
# Faster than the standard library gzip module. | |
# Require Python 3.2+ for context manager support. | |
with subprocess.Popen(('zcat', filename), stdout=subprocess.PIPE) as proc: | |
for l in proc.stdout: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment