def truncate_letters(s, num):
    s = force_unicode(s)
    length = int(num)
    if len(s) > length:
        s = s[:length]
        if not s.endswith('...'):
            s += '...'
    return s
Chops off small real or imaginary parts, or converts
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/django-extensions-1.5.0/django_extensions/utils/text.py/truncate_letters--crossover with--dataset/ETHPy150Open fredrik-johansson/mpmath/mpmath/ctx_base.py/StandardBaseContext.chop