1 import gzip 2 3 conf = None 4 5 -def gzipOpen(fileName, mode='r'): 6 if fileName.endswith('gz'): 7 return gzip.open(fileName, '%sb' % mode) 8 return open(fileName, mode) 9