Beispiel #1
0
def print_field(t, field, matches=None, extras=None):
    if not extras:
        extras = {}
    pad_width = 12
    fieldname = extras.get(field, '  ' + field.title())
    line = TERM.clear_eol + '%s: %s' % (TERM.ljust(
        fieldname, pad_width, '.'), colorize_match(t, field.lower(), matches)
                                        or TERM.red('<none>'))
    print(line)
Beispiel #2
0
def print_field(t, field, matches=None, extras=None):
    if not extras:
        extras = {}
    pad_width = 12
    fieldname = extras.get(field, '  ' + field.title())
    line = TERM.clear_eol + '%s: %s' % (
        TERM.ljust(fieldname, pad_width, '.'),
        colorize_match(t, field.lower(), matches) or TERM.red('<none>')
    )
    print(line)
Beispiel #3
0
def print_field(t, field, matches=None, extras=None):
    if not extras:
        extras = {}
    pad_width = 12
    fieldname = extras.get(field, "  " + field.title())
    line = TERM.clear_eol + "%s: %s" % (
        TERM.ljust(fieldname, pad_width, "."),
        colorize_match(t, field.lower(), matches) or TERM.red("<none>"),
    )
    print(line)