from zipfile import ZipFile import os def getfilespath(filename): dir = os.path.dirname(__file__) return os.path.join(dir, filename) path = getfilespath("bbc-fulltext.zip") archive = ZipFile(path, 'r') files = archive.namelist()