Stuff
public text v1 · immutableimport bisect
def get_width2( o ):
"""Return the screen column width for unicode ordinal o."""
if o == 0xe or o == 0xf:
return 0
elif o <= 126 :
return 1
elif o > widths[-1][0]:
return 1
else:
i = bisect.bisect_left(widths, (o, 0))
return widths[i][1]