
import os

_7ZA_EXE = os.path.abspath("./7za/7za.exe")

def extract(zipfile, dest):
    cmdline = '"%s" x -y "-o%s" "%s"' % (_7ZA_EXE, dest, zipfile)
    print cmdline
    r = os.popen(cmdline)
    files = []
    for line in r:
        line = line.rstrip('\n')
        print line
        files.append(line)
    return files #FIXME: this isn't really a file listing
