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


Groups > comp.lang.python > #52490

Subprocess embedded in curses window

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <veritatem.ignotam@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.034
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'broken': 0.04; 'output': 0.05; 'window?': 0.09; 'python': 0.11; 'emulation': 0.16; 'thanks,': 0.17; 'hey': 0.18; 'all,': 0.19; 'header:User-Agent:1': 0.23; 'fairly': 0.24; 'point': 0.28; 'newer': 0.30; "i'm": 0.30; 'dimensions': 0.31; 'embed': 0.31; 'anyone': 0.31; 'running': 0.33; "i'd": 0.34; 'could': 0.34; 'received:google.com': 0.35; 'grateful': 0.36; 'example,': 0.37; 'message-id:@gmail.com': 0.38; 'window': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'even': 0.60; 'new': 0.61; 'received:173': 0.61; 'kind': 0.63; 'imagine': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=cgbWX3nKPeSdvVQjDMB3SkvxxcnoeCJkyxMuAfHUONs=; b=Ef+/smU5h46J5C1N7nlYZ0FccV9pIc4Bce8f+B+gpp5nxDKP8UsuUjOfNNJyvUjm7B EcFtNGdouEok7CMapd4ZLZOVj61ZaBcl50S2Ia8icTtmt1DAHKcnh9frWslatvcTJOCV 0voWWAZLhkNmlKQrWooEsCB0mjPKsaUkcigdA+uKUi1F7ZIQtF/7KEUdHOSbUywbopg2 hZqiQUmL1sXRtgukODcZAgQ58OE/NExrHOBJqwQ4a/pRgf5+1UDkII1BgZJC/OP8aUfa tFEkjoLLXEjIs+k+blfvautnj4RpNLmXk1kVWuFVkh4DdtZ044eBGVHrBJxyE6xZQthn mXAQ==
X-Received by 10.50.171.163 with SMTP id av3mr374809igc.33.1376440656395; Tue, 13 Aug 2013 17:37:36 -0700 (PDT)
Date Tue, 13 Aug 2013 20:38:35 -0400
From Veritatem Ignotam <veritatem.ignotam@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
MIME-Version 1.0
To Python <python-list@python.org>
Subject Subprocess embedded in curses window
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Mailman-Approved-At Wed, 14 Aug 2013 04:08:44 +0200
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.559.1376446125.1251.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1376446125 news.xs4all.nl 15897 [2001:888:2000:d::a6]:55723
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:52490

Show key headers only | View raw


Hey All,

I'm fairly new to python and even newer to curses. Does any one have a
good solution for how to embed the output of a subprocess (ex.
subprocess.Popen("htop", stdout=subprocess.PIPE)) into an ncurses
window? So for example, the terminal window is broken up into quadrants
and the top right has htop running inside. I'd imagine this would
involve some kind of terminal emulation as the dimensions of the window
would need to be queried by htop.

If anyone could please point me in the right direction, I'd be very grateful

Thanks,

Ignotus

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


Thread

Subprocess embedded in curses window Veritatem Ignotam <veritatem.ignotam@gmail.com> - 2013-08-13 20:38 -0400

csiph-web