Question About Command line arguments

Benjamin Kaplan benjamin.kaplan at case.edu
Fri Jun 10 17:00:45 EDT 2011


On Fri, Jun 10, 2011 at 11:31 AM, Tim Chase
<python.list at 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()?



More information about the Python-list mailing list