how to bail if stdin is empty
From: Jon Schull (schull_at_digitalgoods.com)
Date: 05/31/04
- Next message: Arthur: "Re: terminological obscurity"
- Previous message: Peter Hansen: "Re: exceptions"
- Next in thread: Jeff Epler: "Re: how to bail if stdin is empty"
- Reply: Jeff Epler: "Re: how to bail if stdin is empty"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 May 2004 06:35:34 -0700
I want to write a filter that will take input from files on the
command line and/or from stdin.
But if nothing has been piped to stdin, I don't want my program to
hang--I want it to do something else.
This is standard behavior for pipeable-programs I believe, but I can't
figure out how to do it...neither by reading from stdin nor by using
the fileinput module.
Thanks in advance!
- Next message: Arthur: "Re: terminological obscurity"
- Previous message: Peter Hansen: "Re: exceptions"
- Next in thread: Jeff Epler: "Re: how to bail if stdin is empty"
- Reply: Jeff Epler: "Re: how to bail if stdin is empty"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|