':type message: str
:type color: str | None
:type fd: file'

def print_message(self, message, color=None, fd=sys.stdout):

    if (color and self.color):
        message = message.replace(self.clear, color)
        message = ('%s%s%s' % (color, message, self.clear))
    print(message, file=fd)
    fd.flush()
