On Tue, 2005-03-01 at 22:20 +0000, Max Noel wrote:

>       I don't think you are. You're using readlines(), which means your 
> program won't execute until ps terminates.
>       UNIX philosophy is to have programs start acting as soon as possible 
> -- in that case, as soon as the first line is available. You should be 
> reading sys.stdin as an iterator (same thing you'd do for a file):
> 
> import sys
> for line in sys.stdin:
>       # do stuff with that line of input

Aha, that makes sense. Thanks very much.

Nick .


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to