Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'argument': 0.04; 'skip:$ 30': 0.07; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'oct': 0.16; '\xe9crit': 0.16; 'wrote:': 0.17; 'file.': 0.20; 'import': 0.21; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'though.': 0.29; 'probably': 0.29; 'fri,': 0.30; 'skip:s 30': 0.33; 'avoiding': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; '12,': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=vi88lbo11c1W63D/7DBljYScGTAYYZNLI/8RbirJEjo=; b=QCmdhsGYGff30AROmC8OzEyW8QfQXIO/288TUniizBeaNYJXVPXieDN0vSV8FiqLfM tuOvizc7+Xv72Ai6hI795oi1OdlremiyRGV0mGXhDVVrXJwJEoNU0HefEhDAAkK3tyQ3 iiqccF+v2IZ4vMCHfArqZOr4cZ6kLvIaV9WomS7nhLZYuCLH4odFP+XYx5fd6etYuL55 IbyxT7BYQxqeptpLLMqlCewubKD3DWSW+82iPN+KnA/vrHkZi37S+KNrgI3ZSB2QApTe VP/bvH1vaq8HWvlZeDD2wjrLZI8Q0r85YJSOSWwW0cciHMRBrmMBgyz/E1nW8TgPEzYd ZshQ== MIME-Version: 1.0 In-Reply-To: <029d1272-68a7-4313-92f7-760e5bec141d@googlegroups.com> References: <20121011081607.46014e3d@dilbert> <029d1272-68a7-4313-92f7-760e5bec141d@googlegroups.com> Date: Fri, 12 Oct 2012 03:32:43 +1100 Subject: Re: for-loop on cmd-line From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1349973166 news.xs4all.nl 6850 [2001:888:2000:d::a6]:40619 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31126 On Fri, Oct 12, 2012 at 3:24 AM, wrote: > Le jeudi 11 octobre 2012 15:16:33 UTC+2, Ramchandra Apte a =E9crit : > > PS C:\> $cmd=3D"import sys;" > PS C:\> $cmd+=3D"print('\n'.join(sys.path))" > PS C:\> $cmd > import sys;print('\n'.join(sys.path)) > PS C:\> c:\python32\python -c $cmd > > C:\Windows\system32\python32.zip > c:\python32\DLLs > c:\python32\lib > c:\python32 > c:\python32\lib\site-packages > PS C:\> > > Can probably be in a .cmd file. That doesn't actually make a multi-line argument though. It just dodges the issue by avoiding the for loop :) ChrisA