Hi,
I'm trying to tar the contents of a directory "test" which contains
3 files foo1.xml ,foo2.xml, foo3.xml
in my current directory /home/pythonbox/tmp I have the directory "test"
if I run the below script it fails with the below error, but the files exist in
the directory test
any help would be greatly appreciated
--Brian
##################################
[tmp]$ ./tarup.py
Traceback (most recent call last):
File "./tarup.py", line 29, in ?
tfile .add(f)
File "/usr/lib64/python2.4/tarfile.py", line 1229, in add
tarinfo = self.gettarinfo(name, arcname)
File "/usr/lib64/python2.4/tarfile.py", line 1101, in gettarinfo
statres = os.lstat(name)
OSError: [Errno 2] No such file or directory: 'viz2.xml'
###################################
import string
import os
import shutil
import tarfile
tfile = tarfile.open("files.tar.gz", 'w:gz')
files = os.listdir("test")
for f in files:
tfile .add(f)
tfile.close
--
http://mail.python.org/mailman/listinfo/python-list