Re: ZipFile and file rigths

2005-07-11 Thread perchef
> OTOH, I don't know if this has any relevance to the problem that you are > seeing. not really, i have used the 'os.chmod' trick, but it's still interesting. thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: ZipFile and file rigths

2005-07-11 Thread Sybren Stuvel
Robert Kern enlightened us with: > Yes, the .zip file format does store file permissions appropriate to > the platform that generates the file. I never knew that! Thanks for correcting me ;-) Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for s

Re: ZipFile and file rigths

2005-07-10 Thread Robert Kern
perchef wrote: [Sybren Stuvel:] >>ZIP doesn't store file permissions. Yes, the .zip file format does store file permissions appropriate to the platform that generates the file. > ok, but in that case how could stuffit retrieve these permissions ? > > Thanks for the link Robert. When one makes

Re: ZipFile and file rigths

2005-07-10 Thread perchef
> ZIP doesn't store file permissions. ok, but in that case how could stuffit retrieve these permissions ? Thanks for the link Robert. -- http://mail.python.org/mailman/listinfo/python-list

Re: ZipFile and file rigths

2005-07-10 Thread Robert Kern
perchef wrote: > hi, > > i have written this small code which allow me to unzip files using > python : > > import zipfile > import os > import os.path > > pathDir="/home/toto/Desktop" > pathZip= os.path.join(pathDir,"foobar.zip") > > if zipfile.is_zipfile(pathZip): > zf = zipfile.ZipFile(pa

Re: ZipFile and file rigths

2005-07-10 Thread Sybren Stuvel
perchef enlightened us with: > it works well but i have a small problem : i can't see how i can > deal with file rights. When I unzip files with this script all the > unzipped files haven't the good rights. That's right. Why should they? ZIP doesn't store file permissions. > ZipInfo objects does

Re: ZipFile and file rigths

2005-07-10 Thread perchef
ok thanks, it works even if it's a little bit dirty. -- http://mail.python.org/mailman/listinfo/python-list

Re: ZipFile and file rigths

2005-07-10 Thread ralobao
You can use os.chmod to fix it. Here the description: os.chmod Docstring: chmod(path, mode) Change the access permissions of a file. Cheers, perchef escreveu: > hi, > > i have written this small code which allow me to unzip files using > python : > > import zipfile > import os > impor

ZipFile and file rigths

2005-07-10 Thread perchef
hi, i have written this small code which allow me to unzip files using python : import zipfile import os import os.path pathDir="/home/toto/Desktop" pathZip= os.path.join(pathDir,"foobar.zip") if zipfile.is_zipfile(pathZip): zf = zipfile.ZipFile(pathZip) for file in zf.namelist():