Exemplo n.º 1
0
 def __repr__(self):
     """ Returns the debug string representation of this template. """
     parts, parent, showfs = [colors.blue(self.typeName)], self.parent, True
     if isinstance(self.left, (basestring, )) and self.left:
         parts.append(colors.white('left:') + colors.yellow(self.left))
         showfs = False
     if isinstance(self.right, (basestring, )) and self.right:
         parts.append(colors.white('right:') + colors.yellow(self.right))
         showfs = False
     if showfs:
         parts.append(colors.white('format:') + colors.yellow(self.fs))
     if self.tail:
         parts.append(colors.white('tail:') + colors.black(self.tail))
     return ' '.join(parts)
Exemplo n.º 2
0
    def __repr__(self):
	""" Returns the debug string representation of this template. """
	parts, parent, showfs = [colors.blue(self.typeName)], self.parent, True
	if isinstance(self.left, (basestring, )) and self.left:
	    parts.append(colors.white('left:') + colors.yellow(self.left))
	    showfs = False
	if isinstance(self.right, (basestring, )) and self.right:
	    parts.append(colors.white('right:') + colors.yellow(self.right))
	    showfs = False
	if showfs:
	    parts.append(colors.white('format:') + colors.yellow(self.fs))
	if self.tail:
	    parts.append(colors.white('tail:') + colors.black(self.tail))
	return ' '.join(parts)
Exemplo n.º 3
0
 def shortDescription(self):
     fs = 'Description: {}\nSelector: {}\n'
     args = (colors.cyan(self.description), colors.yellow(self.selector))
     return fs.format(*args)
Exemplo n.º 4
0
 def shortDescription(self):
     fs = 'Description: {}\nSelector: {}\n'
     args = (colors.cyan(self.description), colors.yellow(self.selector))
     return fs.format(*args)