Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #87370

Pexpect idea - but can I handle curses?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone05.am1.xlned.com!bcyclone05.am1.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <skip.montanaro@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.019
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'output': 0.05; 'lines,': 0.07; 'users,': 0.07; 'output,': 0.09; 'rows': 0.09; 'extension.': 0.16; 'fine).': 0.16; 'output?': 0.16; 'spit': 0.16; 'tty': 0.16; 'tweak': 0.16; 'users.': 0.18; 'trying': 0.19; 'command': 0.22; 'input': 0.22; 'skip': 0.24; 'fairly': 0.24; "doesn't": 0.30; 'matching': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'another.': 0.31; 'probably': 0.32; 'another': 0.32; 'raw': 0.33; 'screen': 0.34; 'maybe': 0.34; "i'd": 0.34; 'could': 0.34; 'except': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'clear': 0.37; 'e.g.': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'subject:can': 0.39; 'though,': 0.39; 'to:addr:python.org': 0.39; 'users': 0.40; 'most': 0.60; 'tell': 0.60; 'more': 0.64; 'fire': 0.65; 'wall': 0.65; 'feeling': 0.68; 'brick': 0.84; 'subject:handle': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=e21N/qo+c1V3NYkWt8J0gsB4AEcSZUP8P89SORqT9gc=; b=npeeQmgynKuMLb3r+6i3t06HBfmUd4DqOqjc88jqdrYgtO8zs4k6VswwmV71KsCWng 1A/lK2dKGChScDiviT2AIQZVTqcFcniKSJ8K6BW+jC5g7cc+eI2nm1dkMOa2giW637v2 oe3lmUawQ6hzi7/1BkBZvenJcZ7Uwx7/eNLyuhGZHOr0/mblTULxy1TAMlH39rwksS+L QAMJwcijlprCnvWvhG56Oj9J+mFo0rwJO2MjT4ZVUMu2xNbYAqF7veOmm1KIH0DmIa06 oXZjQ7C8oen3iPd+3bSvO7ICZ2yuPQ8Meqa+K7YQQweQXIZhiDpAG8p/ZRinBY6j7sUL QoLw==
MIME-Version 1.0
X-Received by 10.202.203.12 with SMTP id b12mr3544514oig.27.1426259870914; Fri, 13 Mar 2015 08:17:50 -0700 (PDT)
Date Fri, 13 Mar 2015 10:17:50 -0500
Subject Pexpect idea - but can I handle curses?
From Skip Montanaro <skip.montanaro@gmail.com>
To Python <python-list@python.org>
Content-Type multipart/alternative; boundary=001a11c17616f6a0cd05112d00eb
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.19
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.325.1426259880.21433.python-list@python.org> (permalink)
Lines 44
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1426259880 news.xs4all.nl 2853 [2001:888:2000:d::a6]:43507
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 5466
X-Received-Body-CRC 990695884
Xref csiph.com comp.lang.python:87370

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Pexpect idea - but can I handle curses? Skip Montanaro <skip.montanaro@gmail.com> - 2015-03-13 10:17 -0500
  Re: Pexpect idea - but can I handle curses? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-13 16:54 +0100
    Re: Pexpect idea - but can I handle curses? Skip Montanaro <skip.montanaro@gmail.com> - 2015-03-13 11:20 -0500
      Re: Pexpect idea - but can I handle curses? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-13 18:03 +0100
        Re: Pexpect idea - but can I handle curses? Skip Montanaro <skip.montanaro@gmail.com> - 2015-03-13 12:25 -0500
          Re: Pexpect idea - but can I handle curses? Christian Gollwitzer <auriocus@gmx.de> - 2015-03-13 23:47 +0100
            Re: Pexpect idea - but can I handle curses? Skip Montanaro <skip.montanaro@gmail.com> - 2015-03-13 19:14 -0500
              Re: Pexpect idea - but can I handle curses? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-14 20:19 +0100
                Re: Pexpect idea - but can I handle curses? Skip Montanaro <skip.montanaro@gmail.com> - 2015-03-14 20:05 -0500
                Re: Pexpect idea - but can I handle curses? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-15 10:23 +0100

csiph-web