Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: subprocess.call with non-ASCII arguments? Date: Tue, 15 Dec 2015 21:20:43 -0500 Organization: IISS Elusive Unicorn Lines: 47 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de dSJPnJJ+gpXRWuIXSvewcQKa1vvFNznWFKW8jEUAuyiQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '"""': 0.05; 'subject:skip:s 10': 0.05; 'filename': 0.07; 'archive,': 0.09; 'closed.': 0.09; 'file-like': 0.09; 'filename,': 0.09; 'indicates': 0.09; 'message-id:@4ax.com': 0.09; 'portable': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'string)': 0.09; 'subsequently': 0.09; 'tends': 0.09; 'python': 0.10; 'file,': 0.15; "(i'm": 0.16; 'concatenated': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:non': 0.16; 'uncompressed': 0.16; 'zipfile': 0.16; 'wrote:': 0.16; 'memory': 0.17; 'url:home': 0.18; 'archive': 0.18; 'library': 0.20; '2015': 0.20; '(by': 0.22; 'default,': 0.22; 'interpret': 0.22; 'libraries': 0.22; 'object.': 0.22; 'file.': 0.22; 'dec': 0.23; 'written': 0.24; 'header:X-Complaints-To:1': 0.26; '+0000': 0.27; 'disk': 0.27; 'tar': 0.29; "i'd": 0.31; 'class': 0.33; 'url:python': 0.33; 'open': 0.33; "i'll": 0.33; 'tue,': 0.34; 'file': 0.34; 'done': 0.35; 'clear': 0.35; 'path': 0.35; 'but': 0.36; 'url:org': 0.36; 'url:library': 0.36; 'to:addr :python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'missing': 0.37; 'charset:us-ascii': 0.37; 'building': 0.38; 'mean': 0.38; 'along': 0.39; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'subject:with': 0.40; 'leading': 0.61; 'between': 0.65; '(utc),': 0.84; 'me!': 0.84; 'dennis': 0.91; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: adsl-108-79-218-140.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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:100488 On Tue, 15 Dec 2015 17:57:18 +0000 (UTC), Ulli Horlacher declaimed the following: >Dennis Lee Bieber wrote: > >> Python has a zipfile library that is portable between OS. Along with >> libraries for gzip, bzip2, and tarfiles... > >Ohh.. this is new to me! > >https://docs.python.org/2/library/tarfile.html >https://docs.python.org/2/library/zipfile.html > >What is missing in the documentation: >Is the tar/zip file generation done in memory or will it be written >directly to disk? > From the help file... """ class zipfile.ZipFile(file[, mode[, compression[, allowZip64]]]) Open a ZIP file, where file can be either a path to a file (a string) or a file-like object. """ I'd interpret that to mean that it tends to work with an on-disk file. If you've given it a file name for the archive it likely is not building a memory image and writing it all only when closed. """ ZipFile.write(filename[, arcname[, compress_type]]) Write the file named filename to the archive, giving it the archive name arcname (by default, this will be the same as filename, but without a drive letter and with leading path separators removed). """ I'll admit it is not clear if the individual file is first compressed in memory and then appended to disk file (I'm not that up on the internals of ZIP files; a true TAR file is just a concatenation of uncompressed files; .tar.gz indicates that the concatenated file is subsequently compressed). -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/