title: Using GZIP Module with Python
body: <p>I'm trying to use the Python GZIP module to simply uncompress several .gz files in a directory. Note that I do not want to read the files, only uncompress them. After searching this site for a while, I have this code segment, but it does not work:</p>
  
  <pre><code>import gzip
  import glob
  import os
  for file in glob.glob(PATH_TO_FILE + "/*.gz"):
      #print file
      if os.path.isdir(file) == False:
          shutil.copy(file, FILE_DIR)
          # uncompress the file
          inF = gzip.open(file, 'rb')
          s = inF.read()
          inF.close()
  </code></pre>
  
  <p>the .gz files are in the correct location, and I can print the full path + filename with the print command, but the GZIP module isn't getting executed properly. what am I missing?</p>