Path: csiph.com!x330-a1.tempe.blueboxinc.net!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: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.023 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'pm,': 0.10; 'output': 0.11; 'am,': 0.14; 'wrote:': 0.14; '<--': 0.16; 'phillips': 0.16; 'picks': 0.16; 'argument': 0.16; 'input': 0.17; 'header:In-Reply- To:1': 0.21; '\xa0if': 0.23; 'fri,': 0.23; 'subject:Question': 0.25; 'script': 0.27; 'message-id:@mail.gmail.com': 0.28; 'chase': 0.30; 'to:addr:python-list': 0.33; 'received:209.85.212': 0.34; 'skip:o 20': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.37; 'subject:: ': 0.38; 'received:209': 0.39; 'to:addr:python.org': 0.39; 'subject:About': 0.68; 'subject:line': 0.73; '11:31': 0.84 MIME-Version: 1.0 In-Reply-To: <4DF262F7.1080303@tim.thechases.com> References: <4DF25738.2020704@mrabarnett.plus.com> <4DF262F7.1080303@tim.thechases.com> Date: Fri, 10 Jun 2011 14:00:45 -0700 Subject: Re: Question About Command line arguments From: Benjamin Kaplan To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Junkmail-Status: score=10/49, host=mpv2.tis.cwru.edu X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A020201.4DF285FD.0113,ss=1,fgs=0, ip=209.85.212.173, so=2010-12-23 16:51:53, dmn=2009-09-10 00:05:08, mode=single engine X-Junkmail-IWF: false X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 12 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1307739649 news.xs4all.nl 49039 [::ffff:82.94.164.166]:35961 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7405 On Fri, Jun 10, 2011 at 11:31 AM, Tim Chase wrote: > On 06/10/2011 12:58 PM, Mark Phillips wrote: >> >> How do I write my script so it picks up argument from the >> output of commands that pipe input into my script? > > You can check > > =A0if os.isatty(sys.stdin): =A0# <-- this check Any reason for that over sys.stdin.isatty()?