Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #1/usr/bin/env python
- # this is from The Python
- # Standard Library by example
- # ISBN13: 9780321767349
- # I get: gzcat not found?
- import gzip
- import itertools
- import os
- with gzip.open('example_lines.txt.gz', 'wb') as output:
- output.writelines(
- itertools.repeat('The same line, over and over. \n', 10)
- )
- os.system('gzcat example_lines.txt.gz')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement