BIND 10 #2685: bindctl should pause printing output if that output exceeds 24 lines
BIND 10 Development
do-not-reply at isc.org
Tue Feb 5 09:07:33 UTC 2013
#2685: bindctl should pause printing output if that output exceeds 24 lines
---------------------------------+-----------------------------------------
Reporter: jwright | Owner:
Type: defect | Status: new
Priority: low | Milestone: New Tasks
Component: bind-ctl | Resolution:
Keywords: | CVSS Scoring:
Sensitive: 0 | Defect Severity: Low
Sub-Project: DNS | Feature Depending on Ticket:
Estimated Difficulty: 0 | Add Hours to Ticket: 0
Total Hours: 0 | Internal?: 0
---------------------------------+-----------------------------------------
Comment (by shane):
We can use sys.stdout.isatty() to determine if we are going to a console
and only paginate then.
As normal, Stack Overflow has a possible aid for this:
http://stackoverflow.com/questions/520963/pagination-with-the-python-cmd-
module/1380570#1380570
We can use it like this:
{{{
#!python
import pydoc
f = open("/etc/passwd")
text = f.read()
pydoc.pager(text)
}}}
--
Ticket URL: <http://bind10.isc.org/ticket/2685#comment:2>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list