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 10:03:41 -0500 Organization: IISS Elusive Unicorn Lines: 23 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de F/KFIrJFTcHusrtqBffi+AST80XksSn30ffMpHuhOBeQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:skip:s 10': 0.05; 'cmd': 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; 'skip:[ 30': 0.09; 'spawn': 0.09; 'python': 0.10; '2.7': 0.13; '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; 'zipfile': 0.16; 'url:home': 0.18; 'library': 0.20; '2015': 0.20; 'libraries': 0.22; 'seems': 0.23; 'dec': 0.23; 'dependent': 0.23; 'header:X-Complaints-To:1': 0.26; '+0000': 0.27; 'code:': 0.29; 'posting': 0.32; 'windows.': 0.33; 'tue,': 0.34; 'file': 0.34; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'thought': 0.37; 'charset:us-ascii': 0.37; 'files': 0.38; 'why': 0.39; 'along': 0.39; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'subject:with': 0.40; 'within': 0.64; 'between': 0.65; '(utc),': 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:100460 On Tue, 15 Dec 2015 14:25:50 +0000 (UTC), Ulli Horlacher declaimed the following: >(My first posting seems to got lost) > >I want to create a zip file within a Python 2.7 program on windows. > >My code: > > cmd = ['7za.exe','a','-tzip',archive] + files > status = subprocess.call(cmd) > My first thought would be... WHY spawn an OS dependent subprocess... Python has a zipfile library that is portable between OS. Along with libraries for gzip, bzip2, and tarfiles... -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/