import os
import tarfile

def create_archive(paths, arc_paths, archive_path):
    with tarfile.open(archive_path, 'w:gz') as tf:
        for path, arc_path in zip(paths, arc_paths):
            tf.add(path, arcname=arc_path)

def main():
    archive = 'D:\\Temp\\archive.tar.gz'
paths = ['C:\\files\\foo', 'D:\\files\\bar']
paths = [os.path.abspath(path) for path in paths]
arc_paths = [path.replace(':', '') for path in paths]
create_archive(paths, arc_paths, archive)
tarfile - Adding files from different drives