Package: python-blessings
Version: 1.5-1
Severity: minor
$ export TERM=vt100
$ python -c 'import blessings as b; print "e"+b.Terminal().bold("ggs")'
e$<2>ggs$<2>
This is incorrect. $<2> isn't supposed to be printed on the terminal.
From terminfo(5) manpage:
A delay in milliseconds may appear anywhere in a string capability,
enclosed in $<..> brackets, as in el=\EK$<5>, and padding characters
are supplied by tputs to provide this delay. The delay must be a number
with at most one decimal place of precision; it may be followed by
suffixes ‘*’ or ’/’ or both. A ‘*’ indicates that the padding required
is proportional to the number of lines affected by the operation, and
the amount given is the per‐affected‐unit padding required. (In
the case of insert character, the factor is still the number of lines
affected.) Normally, padding is advisory if the device has the xon
capability; it is used for cost computation but does not trigger
delays. A ‘/’ suffix indicates that the padding is mandatory and
forces a delay of the given number of milliseconds even on devices for
which xon is present to indicate flow control.
Now, with the current API it's impractical to actually implement these
delays, so I propose just to strip $<...> sequences. This is not 100%
correct, but at least gets you correct output on modern emulators of
those ancient terminals which require such delays.
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64
Kernel: Linux 3.8-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-blessings depends on:
ii python 2.7.3-5
--
Jakub Wilk
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]