Example #1
0
    def __init__(self, width=2):
        """
        Class constructor.

        :param width: generate characters of given width.
        :type width: int
        """
        self.characters = (unichr(idx) for idx in xrange(LIMIT_UCS) if wcwidth(unichr(idx)) == width)
Example #2
0
    def __init__(self, width=2):
        """
        Class constructor.

        :param width: generate characters of given width.
        :type width: int
        """
        self.characters = (unichr(idx) for idx in xrange(LIMIT_UCS)
                           if wcwidth(unichr(idx)) == width)
Example #3
0
    def __init__(self, width=1):
        """
        Class constructor.

        :param width: generate characters of given width.
        :type width: int
        """
        self.characters = []
        letters_o = u"o" * width
        for boundaries in ZERO_WIDTH:
            for val in [_val for _val in range(boundaries[0], boundaries[1] + 1) if _val <= LIMIT_UCS]:
                self.characters.append(letters_o[:1] + unichr(val) + letters_o[wcwidth(unichr(val)) + 1 :])
        self.characters.reverse()
Example #4
0
    def __init__(self, width=1):
        """
        Class constructor.

        :param width: generate characters of given width.
        :type width: int
        """
        self.characters = []
        letters_o = (u'o' * width)
        for boundaries in ZERO_WIDTH:
            for val in [
                    _val for _val in range(boundaries[0], boundaries[1] + 1)
                    if _val <= LIMIT_UCS
            ]:
                self.characters.append(letters_o[:1] + unichr(val) +
                                       letters_o[wcwidth(unichr(val)) + 1:])
        self.characters.reverse()