def __repr__(self):
    'Summarize info instead of printing all'
    strs = ['<Info | %s non-empty fields']
    non_empty = 0
    for (k, v) in self.items():
        if (k in ['bads', 'ch_names']):
            entr = (', '.join((b for (ii, b) in enumerate(v) if (ii < 10))) if v else '0 items')
            if (len(entr) >= 56):
                entr = _summarize_str(entr)
        elif ((k == 'filename') and v):
            (path, fname) = op.split(v)
            entr = ((path[:10] + '.../') + fname)
        elif ((k == 'projs') and v):
            entr = ', '.join(((p['desc'] + (': o%s' % {0: 'ff', 1: 'n'}[p['active']])) for p in v))
            if (len(entr) >= 56):
                entr = _summarize_str(entr)
        elif ((k == 'meas_date') and np.iterable(v)):
            entr = dt.fromtimestamp(v[0]).strftime('%Y-%m-%d %H:%M:%S')
        else:
            this_len = (len(v) if hasattr(v, '__len__') else (('%s' % v) if (v is not None) else None))
            entr = (('%d items' % this_len) if isinstance(this_len, int) else (('%s' % this_len) if this_len else ''))
        if entr:
            non_empty += 1
            entr = (' | ' + entr)
        strs.append(('%s : %s%s' % (k, str(type(v))[7:(- 2)], entr)))
    strs_non_empty = sorted((s for s in strs if ('|' in s)))
    strs_empty = sorted((s for s in strs if ('|' not in s)))
    st = '\n    '.join((strs_non_empty + strs_empty))
    st += '\n>'
    st %= non_empty
    return st
Summarize info instead of printing all
def __repr__(self):
    
    strs = ['<Info | %s non-empty fields']
    non_empty = 0
    for (k, v) in self.items():
        if (k in ['bads', 'ch_names']):
            entr = (', '.join((b for (ii, b) in enumerate(v) if (ii < 10))) if v else '0 items')
            if (len(entr) >= 56):
                entr = _summarize_str(entr)
        elif ((k == 'filename') and v):
            (path, fname) = op.split(v)
            entr = ((path[:10] + '.../') + fname)
        elif ((k == 'projs') and v):
            entr = ', '.join(((p['desc'] + (': o%s' % {0: 'ff', 1: 'n'}[p['active']])) for p in v))
            if (len(entr) >= 56):
                entr = _summarize_str(entr)
        elif ((k == 'meas_date') and np.iterable(v)):
            entr = dt.fromtimestamp(v[0]).strftime('%Y-%m-%d %H:%M:%S')
        else:
            this_len = (len(v) if hasattr(v, '__len__') else (('%s' % v) if (v is not None) else None))
            entr = (('%d items' % this_len) if isinstance(this_len, int) else (('%s' % this_len) if this_len else ))
        if entr:
            non_empty += 1
            entr = (' | ' + entr)
        strs.append(('%s : %s%s' % (k, str(type(v))[7:(- 2)], entr)))
    strs_non_empty = sorted((s for s in strs if ('|' in s)))
    strs_empty = sorted((s for s in strs if ('|' not in s)))
    st = '\n    '.join((strs_non_empty + strs_empty))
    st += '\n>'
    st %= non_empty
    return st