import unicodedata
assert unicodedata.east_asian_width('a') == 'N'
assert unicodedata.east_asian_width('\xe6\x84\x9b') == 'W'
Programmatically tell if a Unicode character takes up more than one character space in a terminal