Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #103995

Re: creating zipfile with symlinks

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From MRAB <python@mrabarnett.plus.com>
Newsgroups comp.lang.python
Subject Re: creating zipfile with symlinks
Date Thu, 3 Mar 2016 21:38:03 +0000
Lines 21
Message-ID <mailman.167.1457041097.20602.python-list@python.org> (permalink)
References <CACwCsY5CFNVnTw=xpPJXXmYEH6Qb70yA+-XoJ+waFUdKDd6a8w@mail.gmail.com> <CACwCsY6cBfO4Wf1SebirMkKVCtm_KaK3vF9OPOfeDF5povscuQ@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de BqciShxw15MTk5YItOsasgA12U2DWbZ8+OErsOsISnnw==
Return-Path <python@mrabarnett.plus.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; ':-(': 0.07; 'expected.': 0.09; 'targets': 0.09; 'themselves,': 0.09; 'thu,': 0.15; '2016': 0.16; 'cleaner': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'googling': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:192.168.1.4': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'zipfile': 0.16; 'wrote:': 0.16; 'creates': 0.18; 'solution.': 0.18; 'all,': 0.20; 'this:': 0.23; 'header:In-Reply-To:1': 0.24; 'script': 0.25; 'header:User- Agent:1': 0.26; "doesn't": 0.26; 'opposed': 0.27; 'larry': 0.29; 'code': 0.30; 'anyone': 0.32; 'received:84': 0.32; 'surprised': 0.33; 'possible': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'wanted': 0.37; 'files': 0.38; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'subject:with': 0.40; 'within': 0.64; 'mar': 0.65; 'url:11': 0.72; 'url:wordpress': 0.79; 'url:23': 0.93
X-CM-Score 0.00
X-CNFS-Analysis v=2.1 cv=bsGxfxui c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IkcTkHD0fZMA:10 a=pGLkceISAAAA:8 a=bkKjj9jiAAAA:8 a=uPZiAMpXAAAA:8 a=_heOYFqISs99T3byoLwA:9 a=QEXdDO2ut3YA:10
X-AUTH mrabarnett@:2500
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
In-Reply-To <CACwCsY6cBfO4Wf1SebirMkKVCtm_KaK3vF9OPOfeDF5povscuQ@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:103995

Show key headers only | View raw


On 2016-03-03 20:58, Larry Martell wrote:
> On Thu, Mar 3, 2016 at 1:37 PM, Larry Martell <larry.martell@gmail.com> wrote:
>> I have a script that creates zip files of dirs containing symlinks. I
>> was surprised to find that the zipfiles have zipped the targets of the
>> links as opposed to the links themselves, which is what I wanted and
>> expected. Googling I found this:
>>
>> https://doeidoei.wordpress.com/2010/11/23/compressing-files-with-python-symlink-trouble/
>>
>> Which I don't love as a solution. Anyone know a cleaner way to get
>> zipfile to zip the links?
>
> Actually the code on that site doesn't work at all, so it's not a solution :-(
>
Is it even possible to zip a link?

A quick search came up with this:

Are hard links possible within a zip archive?
http://stackoverflow.com/questions/8859616/are-hard-links-possible-within-a-zip-archive

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: creating zipfile with symlinks MRAB <python@mrabarnett.plus.com> - 2016-03-03 21:38 +0000

csiph-web