def truncateletters(value, arg):
    """
    Truncates a string after a certain number of letters

    Argument: Number of letters to truncate after
    """
    from django_extensions.utils.text import truncate_letters
    try:
        length = int(arg)
    except __HOLE__:  # invalid literal for int()
        return value  # Fail silently
    return truncate_letters(value, length)
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/django-extensions-1.5.0/django_extensions/templatetags/truncate_letters.py/truncateletters