import gzip
with gzip.open('/home/joe/file.txt.gz', 'rb') as f:
    file_content = f.read()