Help with python-list archives

random joe pywin32 at gmail.com
Thu Jan 5 23:08:30 EST 2012


On Jan 5, 10:01 pm, random joe <pywi... at gmail.com> wrote:
> On Jan 5, 9:00 pm, MRAB <pyt... at mrabarnett.plus.com> wrote:

> > import gzip
>
> > in_file = gzip.open(r"C:\2012-January.txt.gz")
> > out_file = open(r"C:\2012-January.txt.tmp", "wb")
> > out_file.write(in_file.read())
> > in_file.close()
> > out_file.close()
>
> > in_file = gzip.open(r"C:\2012-January.txt.tmp")
> > out_file = open(r"C:\2012-January.txt", "wb")
> > out_file.write(in_file.read())
> > in_file.close()
> > out_file.close()
>
> EXCELLENT! Thanks.
>
> THis works however there is one more tiny hiccup. The text has lost
> all significant indention and newlines. Was this intended or is this a
> result of another bug?

Nevermind. Notepad was the problem. After using a real editor the text
is displayed correctly! Thanks for help everyone!

PS: I wonder why no one has added a note to the Python-list archives
to advise people about the bug?



More information about the Python-list mailing list