unzipper.py

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
import codecs
import gzip
from parser import morfFileToExcel
outputDir = '/Users/entropy/GZIP/test'
def openAndMorfGzip(path):
with gzip.open(path, 'rt', encoding='windows-1252') as f:
file_content = f.read()
morfFileToExcel(file_content, outputDir)
openAndMorfGzip('/Users/entropy/TEST/Lsqltext.200131222444.gz')