creating a tar file with python
Brian McCann
Brian.McCann at viziant.net
Thu Aug 23 13:27:15 EDT 2007
Hi,
I'm trying to create a tar file of the contents of the current directory
right now there is only one file "text.xml" in the current dir, I'm using"." current dir as source
but that gives syntax error
any help would be greatly appreciated
--Brian
#!/usr/bin/python
import string
import os
import sys
import time
import errno
import shutil
import tarfile
tar = tarfile.open(.,"test.tar.gz", "w:gz)
<mailto:brian.mccann at viziant.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070823/fd9b2f44/attachment.html>
More information about the Python-list
mailing list