def print_size(self, text):
        size_total = int(self.params.get('upload.maximum_size'))
        size_data_total = int(self.params.get('upload.maximum_data_size'))

        size_regex = self.params.get('recipe.size.regex')
        pattern = re.compile(size_regex, re.M)
        result = pattern.findall(text)
        if result:
            try:
                int(result[0])
            except TypeError:
                result = result[0][:2]
        size = sum(int(n) for n in result)
        size_percent = size / size_total * 100

        size = regular_numner(size)
        size_total = regular_numner(size_total)
        size_percent = '%.1f' % size_percent
        txt = 'Sketch uses {0} bytes ({1}%) '
        txt += 'of program storage space. Maximum is {2} bytes.\\n'
        self.message_queue.put(txt, size, size_percent, size_total)

        size_regex_data = self.params.get('recipe.size.regex.data', '')
        if size_regex_data and size_data_total:
            pattern = re.compile(size_regex_data, re.M)
            result = pattern.findall(text)
            if result:
                try:
                    int(result[0])
                except __HOLE__:
                    result = result[0][1:]
            size_data = sum(int(n) for n in result)
            size_data_percent = size_data / size_data_total * 100
            size_data_remain = size_data_total - size_data

            size_data = regular_numner(size_data)
            size_data_remain = regular_numner(size_data_remain)
            size_data_total = regular_numner(size_data_total)
            size_data_percent = '%.1f' % size_data_percent
            txt = 'Global variables use {0} bytes ({1}%) of dynamic memory, '
            txt += 'leaving {2} bytes for local variables. '
            txt += 'Maximum is {3} bytes.\\n'
            self.message_queue.put(txt, size_data, size_data_percent,
                                   size_data_remain, size_data_total)
dataset/ETHPy150Open Robot-Will/Stino/stino/pyarduino/arduino_compiler.py/Compiler.print_size