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


Groups > comp.lang.python > #104027

Re: creating zipfile with symlinks

From Tim Golden <mail@timgolden.me.uk>
Newsgroups comp.lang.python
Subject Re: creating zipfile with symlinks
Date 2016-03-04 11:12 +0000
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>

Show all headers | 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