Pexpect idea - but can I handle curses?

Skip Montanaro skip.montanaro at gmail.com
Fri Mar 13 11:17:50 EDT 2015


I have this tweak I'd like to make to the top command (Linux only is fine).
Most of the time I want to see just one user or all users. Every now and
again though, I'd like to see all users except another.  Top doesn't
support this functionality, but I thought something like "-u -root" would
be a handy extension. Another would be to watch multiple users, e.g. -u
skip,bob. I thought I could fire up a top command showing all users in a
pseudo tty with a fake huge number of lines, then elide the rows matching
unwanted users. However... I have a feeling I might be fairly seriously
challenged trying to work with top's raw output, as it probably does
something more sophisticated than clear the screen and spit out rows. Will
I be in over my head trying to tweak the output? Hmmm... maybe if I tell
top TERM=dumb?

Anyway, before I get in over my head on the input side, I thought I would
check to see if I'm likely to hit a brick wall on the output side...

Thx,

Skip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150313/133368d3/attachment.html>


More information about the Python-list mailing list