Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #103984 > unrolled thread
| Started by | Larry Martell <larry.martell@gmail.com> |
|---|---|
| First post | 2016-03-03 13:37 -0500 |
| Last post | 2016-03-04 20:12 -0600 |
| Articles | 7 — 6 participants |
Back to article view | Back to comp.lang.python
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
| From | Larry Martell <larry.martell@gmail.com> |
|---|---|
| Date | 2016-03-03 13:37 -0500 |
| Subject | creating zipfile with symlinks |
| Message-ID | <mailman.158.1457030287.20602.python-list@python.org> |
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?
[toc] | [next] | [standalone]
| From | crankypuss <invalid@invalid.invalid> |
|---|---|
| Date | 2016-03-04 04:03 -0700 |
| Message-ID | <nbbprf$heq$1@dont-email.me> |
| In reply to | #103984 |
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? On linux the tar command's --dereference option causes the behavior you describe, which is not its default. Not sure if this is applicable to your situation, or not: http://www.gnu.org/software/tar/manual/html_node/dereference.html -- http://totally-portable-software.blogspot.com [Mon Feb 29: "Addresses - What Good Are They?"]
[toc] | [prev] | [next] | [standalone]
| From | Tim Golden <mail@timgolden.me.uk> |
|---|---|
| Date | 2016-03-04 11:12 +0000 |
| Message-ID | <mailman.183.1457089934.20602.python-list@python.org> |
| In reply to | #104025 |
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
[toc] | [prev] | [next] | [standalone]
| From | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| Date | 2016-03-04 15:56 +0000 |
| Message-ID | <nbcb7u$1lb$1@reader1.panix.com> |
| In reply to | #104025 |
On 2016-03-04, crankypuss <invalid@invalid.invalid> wrote:
> Larry Martell wrote:
[...]
>> 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 module in the Python standard library. You see, this is a
Python newsgroup/mailing-list.
Or you could just google "zipfile". It's the first flippin' link.
[I've been trolled, right?]
--
Grant Edwards grant.b.edwards Yow! Everybody gets free
at BORSCHT!
gmail.com
[toc] | [prev] | [next] | [standalone]
| From | crankypuss <invalid@invalid.invalid> |
|---|---|
| Date | 2016-03-04 11:50 -0700 |
| Message-ID | <nbcl7c$sdj$2@dont-email.me> |
| In reply to | #104042 |
Grant Edwards wrote: > On 2016-03-04, crankypuss <invalid@invalid.invalid> wrote: >> Larry Martell wrote: > [...] >>> 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 module in the Python standard library. You see, this is a > Python newsgroup/mailing-list. > > Or you could just google "zipfile". It's the first flippin' link. > > [I've been trolled, right?] I don't know about that, but you've certainly shown that what I was told about this group being helpful and non-combative is bullshit. Okay, I've looked into Python, best luck all. -- http://totally-portable-software.blogspot.com [Mon Feb 29: "Addresses - What Good Are They?"]
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2016-03-04 13:31 -0700 |
| Message-ID | <mailman.196.1457123561.20602.python-list@python.org> |
| In reply to | #104047 |
On Fri, Mar 4, 2016 at 11:50 AM, crankypuss <invalid@invalid.invalid> wrote: > I don't know about that, but you've certainly shown that what I was told > about this group being helpful and non-combative is bullshit. Look in a mirror much?
[toc] | [prev] | [next] | [standalone]
| From | Wildman <best_lay@yahoo.com> |
|---|---|
| Date | 2016-03-04 20:12 -0600 |
| Message-ID | <gYOdncP7EJ8C3UfLnZ2dnUU7-Y3OydjZ@giganews.com> |
| In reply to | #104051 |
On Fri, 04 Mar 2016 13:31:52 -0700, Ian Kelly wrote: > On Fri, Mar 4, 2016 at 11:50 AM, crankypuss <invalid@invalid.invalid> wrote: >> I don't know about that, but you've certainly shown that what I was told >> about this group being helpful and non-combative is bullshit. > > Look in a mirror much? You/We should thank $DIETY he is gone. Take a look in alt.os.linux or a.o.l.mint or a.o.l.ubuntu sometime. His nym describes his personality to a tee. -- <Wildman> GNU/Linux user #557453 May the Source be with you.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web