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


Groups > comp.lang.python > #104027

Re: creating zipfile with symlinks

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Tim Golden <mail@timgolden.me.uk>
Newsgroups comp.lang.python
Subject Re: creating zipfile with symlinks
Date Fri, 4 Mar 2016 11:12:04 +0000
Lines 21
Message-ID <mailman.183.1457089934.20602.python-list@python.org> (permalink)
References <mailman.158.1457030287.20602.python-list@python.org> <nbbprf$heq$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de uVunJUoUowvm4bw9fc78Aw1QFFjyisrmsG8Gqpv2NJ2Q==
Return-Path <mail@timgolden.me.uk>
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; 'expected.': 0.09; 'targets': 0.09; 'themselves,': 0.09; 'python': 0.10; '"zipfile"': 0.16; 'cleaner': 0.16; 'from:addr:timgolden.me.uk': 0.16; 'from:name:tim golden': 0.16; 'googling': 0.16; 'message- id:@timgolden.me.uk': 0.16; 'module:': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'tjg': 0.16; 'zipfile': 0.16; 'wrote:': 0.16; 'creates': 0.18; 'solution.': 0.18; 'windows': 0.20; 'this:': 0.23; 'header:In-Reply-To:1': 0.24; 'script': 0.25; 'header:User-Agent:1': 0.26; 'opposed': 0.27; 'larry': 0.29; 'anyone': 0.32; 'url:python': 0.33; 'surprised': 0.33; 'url:org': 0.36; 'url:library': 0.36; 'to:addr:python-list': 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; 'url:3': 0.60; 'charset:windows-1252': 0.62; 'from:addr:mail': 0.70; 'url:11': 0.72; 'url:wordpress': 0.79; 'url:23': 0.93
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1
In-Reply-To <nbbprf$heq$1@dont-email.me>
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:104027

Show key headers only | View raw


On 04/03/2016 11:03, crankypuss wrote:
> Larry Martell 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?
> 
> I don't even know what "zipfile" is, is that a Windows command?  

It's a Python module:

https://docs.python.org/3.5/library/zipfile.html

TJG

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


Thread

creating zipfile with symlinks Larry Martell <larry.martell@gmail.com> - 2016-03-03 13:37 -0500
  Re: creating zipfile with symlinks crankypuss <invalid@invalid.invalid> - 2016-03-04 04:03 -0700
    Re: creating zipfile with symlinks Tim Golden <mail@timgolden.me.uk> - 2016-03-04 11:12 +0000
    Re: creating zipfile with symlinks Grant Edwards <invalid@invalid.invalid> - 2016-03-04 15:56 +0000
      Re: creating zipfile with symlinks crankypuss <invalid@invalid.invalid> - 2016-03-04 11:50 -0700
        Re: creating zipfile with symlinks Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-04 13:31 -0700
          Re: creating zipfile with symlinks Wildman <best_lay@yahoo.com> - 2016-03-04 20:12 -0600

csiph-web