gzip a file in Python,f.close()