GMgKe586q6suSQnyqZLlGCooeWM
Learn To Program
Increase Your Knowlegde and Build Your Skill!
Pages
Home
Me
Search
Monday, March 21, 2011
Python - gzip File
To create a gzip file, type
>>> import gzip
>>> content = 'This is the big text file'
>>> f = gzip.open('hello.gz', 'wb')
>>> f.write(content)
>>> f.close()
To read from a gz file, type
>>> f = gzip.open('hello.gz', 'rb')
>>> content = f.read()
Python - gzip File
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment