Alan wrote: > Hi there! > > I managed to find the problem and the solution. > > First, I've forgot to mention that in my script, oname is an uploaded file. > I just inserted a f.close() and voilá! > > def upload_external(self,file,REQUEST): > import os,tarfile > ... > f=open(oname,"wb") > f.write(file.read()) > f.close() > ... > tar = tarfile.open(oname,"r:gz") > for itar in tar: > tar.extract(itar.name,jobdir) > return "Done" >
Err. why not tar=tarfile.open(fileobj=file) ? Why bother with potentially name clashing files in filesystem? Regards Tino _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )