Wrapping prstat on Solaris

Skip Montanaro skip at pobox.com
Sun Aug 2 03:38:46 CEST 2009

> You haven't told us how you are actually reading from prstat's output
> pipe, which may be the cause. For instance, if you are doing
> for line in pipe:
>   print line
>   ...
> then this could cause your buffering issue.
> Instead try using readline():
> while True:
>   line = pipe.readline()
>   ...

Yes, I've been using for line in pipe.  Switching to your construct
seems to work like a charm.



More information about the Python-list mailing list