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


Groups > comp.lang.python > #7405

Re: Question About Command line arguments

References <BANLkTi==QHd+5C=xf+2Re1Mh4V6Hk972hg@mail.gmail.com> <4DF25738.2020704@mrabarnett.plus.com> <BANLkTimHfZK=FsbSs4BOX8dU=mt2bVGV9A@mail.gmail.com> <4DF262F7.1080303@tim.thechases.com>
Date 2011-06-10 14:00 -0700
Subject Re: Question About Command line arguments
From Benjamin Kaplan <benjamin.kaplan@case.edu>
Newsgroups comp.lang.python
Message-ID <mailman.108.1307739649.11593.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Jun 10, 2011 at 11:31 AM, Tim Chase
<python.list@tim.thechases.com> 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
>
>  if os.isatty(sys.stdin):  # <-- this check

Any reason for that over sys.stdin.isatty()?

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


Thread

Re: Question About Command line arguments Benjamin Kaplan <benjamin.kaplan@case.edu> - 2011-06-10 14:00 -0700

csiph-web