def resize(self, width=None):
        """Resizes image to fit inside terminal

        Called by the constructor automatically.
        """
        (iw, ih) = self.size
        if width is None:
            width = min(iw, utils.term.width)
        elif isinstance(width, basestring):
            percents = dict([(pct, '%s%%' % (pct)) for pct in range(101)])
            width = percents[width]
        height = int(float(ih) * (float(iw) / float(width)))
        height //= 2
        self.img = self.img.resize((width, height))
dataset/ETHPy150Open jart/fabulous/fabulous/image.py/Image.resize/swapped operands of `/`