Ejemplo n.º 1
0
  def handle_colors(self, world, text):
    """ Prints out all the colors we know about."""
    response = ''
    for background in range(40,48):
      for foreground in range(30,38):
        response += color(str(foreground), foreground, background)
        response += color(str(foreground), foreground, background, 1)
      response += "\33[0m\n"

    self.write(response)
Ejemplo n.º 2
0
    def handle_colors(self, world, text):
        """ Prints out all the colors we know about."""
        response = ''
        for background in range(40, 48):
            for foreground in range(30, 38):
                response += color(str(foreground), foreground, background)
                response += color(str(foreground), foreground, background, 1)
            response += "\33[0m\n"

        self.write(response)
Ejemplo n.º 3
0
 def handleInput(self, world, input):
   comm = input.split(" ", 1)[0]
   if ("handle_%s" % comm) in self._dir:
     exec ( "self.handle_%s(world, input)" % comm)
   else:
     # CATCH ALL for bad commands
     self.write(color("huh? '%s'\n" % input, 35))
   self.write("> ")
Ejemplo n.º 4
0
 def handleInput(self, world, input):
     comm = input.split(" ", 1)[0]
     if ("handle_%s" % comm) in self._dir:
         exec("self.handle_%s(world, input)" % comm)
     else:
         # CATCH ALL for bad commands
         self.write(color("huh? '%s'\n" % input, 35))
     self.write("> ")