Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ian Kelly Newsgroups: comp.lang.python Subject: Re: Request Help With Function Date: Mon, 4 Apr 2016 13:54:56 -0600 Lines: 14 Message-ID: References: <-JSdnXtfvv0oXp_KnZ2dnUU7-evNnZ2d@giganews.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de OjHldDBD3TtuD14DCBYSrQ4sfcoq6VGAfC/1B1I9Rogw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.032 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'strings.': 0.07; 'subject:Function': 0.07; 'subject:Help': 0.10; '2016': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'string,': 0.18; 'pass': 0.22; 'passing': 0.23; 'this:': 0.23; 'second': 0.24; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'command': 0.26; 'message-id:@mail.gmail.com': 0.27; 'probably': 0.31; 'list': 0.34; 'received:google.com': 0.35; 'should': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'received:209.85.213': 0.37; 'list.': 0.37; 'wanted': 0.37; 'received:209': 0.38; 'to:addr:python.org': 0.40; 'python-list': 0.66; 'elements:': 0.84; 'to:name:python': 0.84; 'subject:With': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=OZwVNTJncZAk3oMBgpCcCl/Ji2xRnjDizyOJQHPK4h8=; b=GLvOtM2JrOnlA03xBerXBZDeGsjG5i/TvUaCZhSQiFixr2KXvG2Z8p3utPny7GfgIe SVM1eJpHgG1U20c0aCClVk5QktPdQlRKHawbtiBWw1jFzjUjEt5Ysz93ctvJLVC/MpJY X2we8P4GaH/ylq3uobrbI1rSHUzPrtYbC1VM+hKamQdfT3KbRKeuEC0pwG6H1MhPGnTH /qtuU5QwuukzMFuf2jq06RV8kDDSNxipHBLyTwTOXvq132HmYJJ2XK2mDAkrAHEqGehE HQ6f7pm0ujPkUPMesbjrjbZU9r8LKvOdFv1M83CuN9ec5NJwiEMf6feEjPaciwN6Dtsm XCqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=OZwVNTJncZAk3oMBgpCcCl/Ji2xRnjDizyOJQHPK4h8=; b=U6oQ0qGob92pNELv1vJdy1fpjqH6/4SMc0im9Cz5SLRHF9Kn40xpT9i5Ay3+M7VLKz +K0h6pBfvnzpuT7PcjhGWciT7RjRPHtOcflZdPXqBgv/piI47IjYkVaH5UIwdH1vzGYl +C3BB++GxIlTTODjQUhrMZPEio4eoM8k+ajyFw0j4gJvJa0/LX+f2VY9WXzu4v1JLOL4 NpfMh0vsgYfQuFrLx5ATQNTtN0TbmFn4lwYipziEctLdvyarj7NTEV7lmDv3CE7CeRX2 Ig6fSw6ehD0SK5u3WMpVX9GVkrE5e52eXhOaaX9GCUBhavXAxAqGt4m1IHpfZlnaiI9z 075w== X-Gm-Message-State: AD7BkJL0/ZMH2m3ayj2jt/gB1OcMr1FyUX7CZUNwngHeQJaKPYcSmoThnz+I960KEeTCOJkZIdDJe3tm1ol58w== X-Received: by 10.50.131.201 with SMTP id oo9mr11711105igb.68.1459799736269; Mon, 04 Apr 2016 12:55:36 -0700 (PDT) In-Reply-To: <-JSdnXtfvv0oXp_KnZ2dnUU7-evNnZ2d@giganews.com> 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: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <-JSdnXtfvv0oXp_KnZ2dnUU7-evNnZ2d@giganews.com> Xref: csiph.com comp.lang.python:106462 On Mon, Apr 4, 2016 at 1:42 PM, Wildman via Python-list wrote: > commandlist = commandlist.split(",") commandlist is a list. > command = [target, commandlist] > subprocess.Popen(command) This is passing a list containing two elements: the first is a string, and the second is a list of strings. You should just pass a list of strings. Probably you wanted to do this: command = [target] + commandlist