def qiime_open(fp, permission='U'):
 if is_gzip(fp):
  return gzip_open(fp)
 else:
  return open(fp, permission)

def qiime_open ( fp , permission = 'U' ) : if is_gzip ( fp ) : return gzip_open ( fp ) else : return open ( fp , permission )
wrapper to allow opening of gzipped or non-compressed files read or write the contents of a file file_fp : file path permission : either r .