> > import tarfile > > > > tar = tarfile.open(filename, "w:gz") > > tar.add(directory) > > tar.close() This works perfectly on linux, but it wasn't working for me on windows yesterday. I'll try it again the next time I'm on windows.