Wrapping prstat on Solaris
Skip Montanaro
skip at pobox.com
Sat Aug 1 21:38:46 EDT 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.
Thanks,
Skip
More information about the Python-list
mailing list