Read from a gzip file in python,f.close()