def archive(filename, files):
    """Creates archive of list of files with a name."""
    import tarfile
    with tarfile.open(filename, 'w:gz') as tar:
        for f in files:
            print('  compressing ' + f)
            tar.add(f)
