[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#770704: ITP: wcwidth -- determine printable width of a string on a terminal



On Sun, Nov 23, 2014 at 01:58:09PM +0100, Sebastian Ramacher wrote:
> * Package name    : wcwidth
> * URL             : https://pypi.python.org/pypi/wcwidth/0.1.4
> * License         : Expat
>   Programming Lang: Python
>   Description     : determine printable width of a string on a terminal
> 
> wcwidth allows to determine the printable width of a string on a
> terminal. It provides functions similar to wcwidth(3) and wcswidth(3)
> for Python programs.

Contrary to the name and description, it's not an end-user utility but only
a library.  Shouldn't it thus be named python-wcwidth or something, to
convey it's useful only from python?  I'd reserve the name "wcwidth" to
something usable from the shell.

Also, it contains hardcoded data from an ancient version of Unicode.  What
about generating this data instead (such as Marcus Kuhn's code, which this
library is lifted from, does)?

Even better, it would be better to call libc's wcwidth() instead of
reinventing the wheel -- as a bonus, the data would be current without need
for manual intervention.


-- 
// If you believe in so-called "intellectual property", please immediately
// cease using counterfeit alphabets.  Instead, contact the nearest temple
// of Amon, whose priests will provide you with scribal services for all
// your writing needs, for Reasonable and Non-Discriminatory prices.


Reply to: