Path: csiph.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Larry Martell Newsgroups: comp.lang.python Subject: creating zipfile with symlinks Date: Thu, 3 Mar 2016 13:37:24 -0500 Lines: 9 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de laREhC5owVwtlfKs5w+fzwHKMKEZRQOsIYL9ENpRXS9A== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.023 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'expected.': 0.09; 'targets': 0.09; 'themselves,': 0.09; 'cleaner': 0.16; 'googling': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'zipfile': 0.16; 'creates': 0.18; 'solution.': 0.18; 'to:name:python- list@python.org': 0.20; 'this:': 0.23; 'script': 0.25; 'message- id:@mail.gmail.com': 0.27; 'opposed': 0.27; 'anyone': 0.32; 'surprised': 0.33; 'received:google.com': 0.35; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'received:209.85.213': 0.37; 'wanted': 0.37; 'received:209': 0.38; 'files': 0.38; 'to:addr:python.org': 0.40; 'subject:with': 0.40; 'url:11': 0.72; 'url:wordpress': 0.79; 'url:23': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=rZbr2NXrob3qwjL2hDPN5T2TYwhybicimMy2JOzgKtE=; b=eWJG6fqylBxNI1va/3WC14k3tr5QGeHyFpxcMdMYKO2hIQGyyDauFgoiMElvNPKu+i pI4Q79ccHr68lAY4OliwyavqYm+/sQI1SQR2r/vo+JRuz3E34pidAIJChlIflkDHWISB sKjWjvouKUwEmTnTH/qtlae58BiZ6ovjURk29G5fo81azgGFF8s4kYKxkEqMvXg0Ia5L 8VhP6aLPuv6DmmcBUBdRm65r015jFoabgAZbRNajOaIJsSTeR4POqYUvGGccBYfYtZis RGDRzu0QXLnmAHE7w36Z7UMBNhXkjNnEvyitu6sPUIgs55mOYv852kwEtfFHdg+iFbJ7 IGwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=rZbr2NXrob3qwjL2hDPN5T2TYwhybicimMy2JOzgKtE=; b=B8qiEnJ9t4fGB6nufnuYr+wdmLoR+MYcrqs5ks3WPMbLZ6Dk1V5M8qNimHQpmDn1NE P7eSRyKPRLxnMVhrwbJbMHF3Z3Ncdh05oVq2DXeb0xq0bRziXOrL6JWzmrlo+Dlm3N0R hfVXL/iG1sDsLwMzPEzSrjfQOz8ksGP5o6jbMtf/5jgTD+Vr9SAxWaq3Fu3fnG7gx55R U86bd8zAok+nMhzS69zs86A7sdM1Nfy1Mt//7NEcX8/VxIO0HTBZAA3DfANxHllrpOHT JGg1UaY4pelF4i+JaCKx8p0foOaG7FZeYyS1CNElNCrpJemVsbch4MC74sd8vrPrDD/5 F7zA== X-Gm-Message-State: AD7BkJIbC4Vmzepn1vck0G94BFE0H+nxINxhyCbLU4KsK5qGHlA8rrRSyRbWRv/9ErU1SndccrwXbIiowN/D9w== X-Received: by 10.50.129.8 with SMTP id ns8mr534312igb.95.1457030284808; Thu, 03 Mar 2016 10:38:04 -0800 (PST) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:103984 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?