code: def download_file(url, suffix=''):
      
      r = urllib2.urlopen(url)
      # Save attached file in temp file and return path to temp file
      fd, f_path = tempfile.mkstemp(suffix=suffix)
      os.write(fd, r.read())
      os.close(fd)
      return f_path, suffix
docs: Download attached file as temporary file.
  
      Parameters
      ----------
      url : string
          SCO-API download Url
      suffix : string, optional
          If suffix is specified, the name of the downloaded file will end with
          that suffix, otherwise there will be no suffix.
  
      Returns
      -------
      string, string
          Path to downloaded file and file suffix