Created
March 16, 2018 14:11
-
-
Save greut/1f2cd01e513d3cee209f98ac1f1ead68 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 | |
with open("foo.py.gz", "wb") as f: | |
q = subprocess.Popen(["gzip"], stdout=f, stdin=subprocess.PIPE) | |
p = subprocess.Popen(["more", "foo.py"], stdout=q.stdin) | |
q.communicate() | |
p.wait() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment