Python ntpq
Eric S. Raymond
esr at thyrsus.com
Sun Nov 27 12:07:20 UTC 2016
Achim Gratz <Stromeko at nexgo.de>:
> Achim Gratz writes:
> > It doesn't use wide display for the rv and cv commands no matter the
> > option.
>
> That turned out to be caused by a hardcoded width:
>
> --- a/ntpq/ntpq
> +++ b/ntpq/ntpq
> @@ -443,7 +444,7 @@ usage: help [ command ]
> lastcount = 0
> else:
> lastcount += 1
> - if lastcount + len(item) > 78:
> + if lastcount + len(item) > self.termwidth:
> text = text[:-1] + "\n"
> text += item
> text = text[:-2] + "\n"
Actually, self.termwidth - 2. But yes.
C ntpq had *all* its widths fixed like that.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
More information about the devel
mailing list