Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31208

Re: How to use "while" within the command in -c option of python?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
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; 'failing': 0.05; 'inserts': 0.07; 'newline': 0.07; 'subject:How': 0.09; 'python': 0.09; 'subject:command': 0.09; 'subject:while': 0.09; 'subject:python': 0.11; 'index': 0.13; 'ah!': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'oct': 0.16; 'wrote:': 0.17; 'fix': 0.17; 'shell': 0.18; 'thanks.': 0.21; 'header:In-Reply- To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'chris': 0.28; 'writes:': 0.29; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'subject:?': 0.35; 'received:209.85': 0.35; 'subject:" ': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'side': 0.61; 'challenge.': 0.84; 'subject: -': 0.84
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; bh=B/bCjEdapUBH8jPBBGJq2V3ijDsV/+TkODNdcDqLBVc=; b=kfk7h6kQl0Kjw33ZHuUnerzgbFZThRJsLQ5j5ZQJNDvBqidat/WnhASiVlVNlSnFya jGdINLxLSUJz7W5VU30NiRju2TNNlcvX+Tnw32cGARuvfjv21wQPYrvhZwY4DDNm2H/O Z4HlHRwJdS7ZFhzj5GDy6lC2L4fcZ+zqBuMctCpBS/comO9gyAxJ0GK5KTPZZFW9vz84 3k6KXGZyKQJ0mC52DklN5m5Hb/TsvdMyW2EZ25GNtmXMfEjeJz/nBVbSjq0PpOEZ1Whd CmNGwUC9RG997Pr0NUFu+26Gok5l6EiH5RBcQ4hF3RJbaaIVDuFWsn8UhpubfJlJS18L LOyA==
MIME-Version 1.0
In-Reply-To <qot391i2rot.fsf@ruuvi.it.helsinki.fi>
References <CANOe_mhhn31Qb2iB1nWydWSm=MJ0xK0o5vxWR+mLeO5ggqwmwQ@mail.gmail.com> <mailman.2101.1350083051.27098.python-list@python.org> <5078b6a9$0$6574$c3e8da3$5496439d@news.astraweb.com> <20121013084132.GA5083@taris.box> <CAPTjJmrBc1hABysXXpkTs3YWnBukEg=WiZD2TFnUWnQmXJ-t7g@mail.gmail.com> <CAN1F8qX50y6uVFXs6OxZaVYyUPT-1jLHqY5GoDr3x4Xctd0Xtw@mail.gmail.com> <mailman.2125.1350149008.27098.python-list@python.org> <qot391i2rot.fsf@ruuvi.it.helsinki.fi>
Date Sun, 14 Oct 2012 04:47:58 +1100
Subject Re: How to use "while" within the command in -c option of python?
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2127.1350150481.27098.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1350150481 news.xs4all.nl 6951 [2001:888:2000:d::a6]:58574
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:31208

Show key headers only | View raw


On Sun, Oct 14, 2012 at 4:43 AM, Jussi Piitulainen
<jpiitula@ling.helsinki.fi> wrote:
> Chris Angelico writes:
>
>> Here's a side challenge. In any shell you like, start with this
>> failing statement, and then fix it without retyping anything:
>>
>> sikorsky@sikorsky:~$ python -c "a=1; if a: print(a)"
>
> C-v C-j inserts a newline for me, in bash.

Ah! So it does. Thanks.

*stashes that away in the "handy commands" index in his brain*

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: How to use "while" within the command in -c option of python? Etienne Robillard <animelovin@gmail.com> - 2012-10-12 19:04 -0400
  Re: How to use "while" within the command in -c option of python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-13 00:32 +0000
    Re: How to use "while" within the command in -c option of python? Thomas Bach <thbach@students.uni-mainz.de> - 2012-10-13 10:41 +0200
    Re: How to use "while" within the command in -c option of python? Chris Angelico <rosuav@gmail.com> - 2012-10-13 20:03 +1100
    Re: How to use "while" within the command in -c option of python? Chris Angelico <rosuav@gmail.com> - 2012-10-14 04:23 +1100
      Re: How to use "while" within the command in -c option of python? Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2012-10-13 20:43 +0300
        Re: How to use "while" within the command in -c option of python? Chris Angelico <rosuav@gmail.com> - 2012-10-14 04:47 +1100
    Re: How to use "while" within the command in -c option of python? Chris Angelico <rosuav@gmail.com> - 2012-10-14 05:41 +1100
    Re: How to use "while" within the command in -c option of python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-10-13 15:19 -0400
    Re: How to use "while" within the command in -c option of python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-10-13 16:42 -0400
    Re: How to use "while" within the command in -c option of python? Chris Angelico <rosuav@gmail.com> - 2012-10-14 08:39 +1100
    Re: How to use "while" within the command in -c option of python? Chris Angelico <rosuav@gmail.com> - 2012-10-14 09:09 +1100

csiph-web