Esempio n. 1
0
 def __init__(self, names, doc=None, histr=None, attr=0, hiattr=None):
     if isinstance(names, (tuple, list)):
         self.names = names
     else:
         self.names = (names,)
     self.doc = doc
     text = ", ".join(self.names)
     Entry.__init__(self, text, histr=histr, attr=attr, hiattr=hiattr)
Esempio n. 2
0
 def __init__(self, text, indent, attr=0, attrtype="bold"):
     Entry.__init__(self, text, attr=attr)
     self.indent = indent
     if attrtype == "bold":
         self.hiattr = curses.A_BOLD
         self.rematch = Help.regexs["bold"]
         self.symbol = "*"
     elif attrtype == "underline":
         self.hiattr = curses.A_UNDERLINE
         self.rematch = Help.regexs["underline"]
         self.symbol = "+"
     elif attrtype == "reverse":
         self.hiattr = curses.A_REVERSE
         self.rematch = Help.regexs["reverse"]
         self.symbol = "@"
     elif attrtype == "prompt":
         self.hiattr = look.colors["CmdlinePrompt"]
         self.rematch = Help.regexs["prompt"]
         self.symbol = "$"