On 08/07/2013 23:02, Joshua Landau wrote:
On 8 July 2013 22:38, MRAB <pyt...@mrabarnett.plus.com> wrote:
On 08/07/2013 21:56, Dave Angel wrote:
Characters do not have a width.
[snip]
It depends what you mean by "width"! :-)
Try this (Python 3):
print("A\N{FULLWIDTH LATIN CAPITAL LETTER A}")
AA
Serious question: How would one find the width of a character by that
definition?
>>> import unicodedata
>>> unicodedata.east_asian_width("A")
'Na'
>>> unicodedata.east_asian_width("\N{FULLWIDTH LATIN CAPITAL LETTER A}")
'F'
The possible widths are:
N = Neutral
A = Ambiguous
H = Halfwidth
W = Wide
F = Fullwidth
Na = Narrow
All you then need to do is find out what those actually mean...
--
http://mail.python.org/mailman/listinfo/python-list