# Path: voltron/core.py
# STRTYPES = (str, unicode)


import six
import struct
import logging
import pygments
from pygments.token import *
from numbers import Number as NumberType
from voltron.core import STRTYPES
from voltron.view import *
from voltron.plugin import *
from voltron.api import *
            formats = self.FORMAT_INFO[arch]
            formatted = {}
            for fmt in formats:
                # Apply defaults where they're missing
                fmt = dict(list(self.config.format.items()) + list(fmt.items()))

                # Format the data for each register
                for reg in fmt['regs']:
                    # Format the label
                    label = fmt['label_format'].format(reg)
                    if fmt['label_func'] != None:
                        formatted[reg + 'l'] = getattr(self, fmt['label_func'])(str(label))
                    if fmt['label_colour_en']:
                        formatted[reg + 'l'] = format(Name.Label, formatted[reg + 'l'])

                    # Format the value
                    val = data[reg]
                    if isinstance(val, STRTYPES):
                        temp = fmt['value_format'].format(0)
                        if len(val) < len(temp):
                            val += (len(temp) - len(val)) * ' '
                        formatted_reg = format(Text, val)
                    else:
                        token = Text
                        if self.last_regs is None or self.last_regs is not None and val != self.last_regs[reg]:
                            token = Error
                        formatted_reg = val
                        if fmt['value_format'] != None and isinstance(formatted_reg, NumberType):
                            formatted_reg = fmt['value_format'].format(formatted_reg)
                        if fmt['value_func'] != None:

# Path: voltron/core.py
# STRTYPES = (str, unicode)


# Path: voltron/plugins/view/register.py
import six
import struct
import logging
import pygments
from pygments.token import *
from numbers import Number as NumberType
from voltron.core import STRTYPES
from voltron.view import *
from voltron.plugin import *
from voltron.api import *

            formats = self.FORMAT_INFO[arch]
            formatted = {}
            for fmt in formats:
                # Apply defaults where they're missing
                fmt = dict(list(self.config.format.items()) + list(fmt.items()))

                # Format the data for each register
                for reg in fmt['regs']:
                    # Format the label
                    label = fmt['label_format'].format(reg)
                    if fmt['label_func'] != None:
                        formatted[reg + 'l'] = getattr(self, fmt['label_func'])(str(label))
                    if fmt['label_colour_en']:
                        formatted[reg + 'l'] = format(Name.Label, formatted[reg + 'l'])

                    # Format the value
                    val = data[reg]
                    if isinstance(val, STRTYPES):
                        temp = fmt['value_format'].format(0)
                        if len(val) < len(temp):
                            val += (len(temp) - len(val)) * ' '
                        formatted_reg = format(Text, val)
                    else:
                        token = Text
                        if self.last_regs is None or self.last_regs is not None and val != self.last_regs[reg]:
                            token = Error
                        formatted_reg = val
                        if fmt['value_format'] != None and isinstance(formatted_reg, NumberType):
                            formatted_reg = fmt['value_format'].format(formatted_reg)
                        if fmt['value_func'] != None:

                            if isinstance(fmt['value_func'], STRTYPES):