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


Groups > comp.lang.python > #31175

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

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <sorsorday@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'syntax': 0.03; 'subject:How': 0.09; 'python': 0.09; 'os;': 0.09; 'subject:command': 0.09; 'subject:while': 0.09; 'subject:python': 0.11; '"import': 0.16; 'syntaxerror:': 0.16; 'true:': 0.16; 'import': 0.21; 'received:209.85.214.174': 0.21; '"",': 0.22; 'message-id:@mail.gmail.com': 0.27; 'file': 0.32; '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; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'header:Received:5': 0.40; 'subject: -': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Uom/BDVzI243S2cJQm2DDaztF/hqGHgOBS1H/xHOjKw=; b=SnNo4x2C0dLZRc5IYTUg+Vp7p0m4lojV/C+NOlrXhoItgY41TWBX9+HffynKtY7Aox Yx5H6Sr04D6Qx50W7Uc1JuM3ISJcqgG+d9BAd9amxEvXCLI4rnicPYHYVnj0Epo4POIX S2zVyE9TwenOR7JYA43E4sWmm7uBlg6r27ZZvT3HxATwtkd9/uNpa04um/+uzuuKPCUo KDer2OjuF9pXnvPovqErG7+L+wta0mlAdaUzrlyahSZTICMaCQ7iud+IRTMjLcoup1to c8mlVROwss0GaW/Ws62LcnT6M6vKEhObuwKn2HF+eOm1iOinLaAHfs4J7DIK8ReKIkRF 0qWw==
MIME-Version 1.0
Date Fri, 12 Oct 2012 15:51:19 -0700
Subject How to use "while" within the command in -c option of python?
From Herman <sorsorday@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.2100.1350082282.27098.python-list@python.org> (permalink)
Lines 5
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1350082282 news.xs4all.nl 6844 [2001:888:2000:d::a6]:45921
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:31175

Show key headers only | View raw


 python -c "import os; while True: print('hello')"
 File "<string>", line 1
 import os; while True: print('hello')
                      ^
SyntaxError: invalid syntax

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


Thread

How to use "while" within the command in -c option of python? Herman <sorsorday@gmail.com> - 2012-10-12 15:51 -0700

csiph-web