Esempio n. 1
0
    def get_attr(self, *keys):
        """Returns the curses attribute for the specified keys

        Ready to use for curses.setattr()
        """
        fg, bg, attr = self.get(*flatten(keys))
        return attr | color_pair(get_color(fg, bg))
Esempio n. 2
0
    def get_attr(self, *keys):
        """Returns the curses attribute for the specified keys

        Ready to use for curses.setattr()
        """
        fg, bg, attr = self.get(*flatten(keys))
        return attr | color_pair(get_color(fg, bg))
Esempio n. 3
0
 def color_at(self, y, x, wid, *keys):
     """Change the colors at the specified position"""
     keys = flatten(keys)
     attr = self.settings.colorscheme.get_attr(*keys)
     try:
         self.win.chgat(y, x, wid, attr)
     except _curses.error:
         pass
Esempio n. 4
0
 def color(self, *keys):
     """Change the colors from now on."""
     keys = flatten(keys)
     attr = self.settings.colorscheme.get_attr(*keys)
     try:
         self.win.attrset(attr)
     except _curses.error:
         pass
	def color_at(self, y, x, wid, *keys):
		"""Change the colors at the specified position"""
		keys = flatten(keys)
		attr = self.settings.colorscheme.get_attr(*keys)
		try:
			self.win.chgat(y, x, wid, attr)
		except _curses.error:
			pass
	def color(self, *keys):
		"""Change the colors from now on."""
		keys = flatten(keys)
		attr = self.settings.colorscheme.get_attr(*keys)
		try:
			self.win.attrset(attr)
		except _curses.error:
			pass
Esempio n. 7
0
def depends_on(*args):
    args = tuple(flatten(args))

    def decorator(fnc):
        fnc.dependencies = args
        return fnc

    return decorator
Esempio n. 8
0
def depends_on(*args):
	args = tuple(flatten(args))
	def decorator(fnc):
		try:
			fnc.dependencies += args
		except:
			fnc.dependencies  = args
		return fnc
	return decorator