Exemplo n.º 1
0
 def print_todos(self):
     """
     Returns a pretty-printed string (without colors) of the todo items in
     this list.
     """
     printer = PrettyPrinter()
     return printer.print_list(self._todos)
Exemplo n.º 2
0
 def print_todos(self):
     """
     Returns a pretty-printed string (without colors) of the todo items in
     this list.
     """
     printer = PrettyPrinter()
     return printer.print_list(self._todos)
Exemplo n.º 3
0
    def pretty_print(self, p_pp_filters=None):
        """ Pretty prints the view. """
        p_pp_filters = p_pp_filters or []

        # since we're using filters, always use PrettyPrinter
        printer = PrettyPrinter()
        printer.add_filter(PrettyPrinterNumbers(self._todolist))
        printer.add_filter(PrettyPrinterColorFilter())

        for ppf in p_pp_filters:
            printer.add_filter(ppf)

        return printer.print_list(self._viewdata)
Exemplo n.º 4
0
 def __str__(self):
     printer = PrettyPrinter()
     return printer.print_list(self._todos)
Exemplo n.º 5
0
 def _print_list(self, p_todos):
     printer = PrettyPrinter()
     printer.add_filter(PrettyPrinterNumbers(self.todolist))
     self.out(printer.print_list(p_todos))
Exemplo n.º 6
0
 def _print_list(self, p_todos):
     printer = PrettyPrinter()
     printer.add_filter(PrettyPrinterNumbers(self.todolist))
     self.out(printer.print_list(p_todos))
Exemplo n.º 7
0
def print_view(p_view):
    printer = PrettyPrinter()
    return "\n".join([str(s) for s in printer.print_list(p_view.todos)])
Exemplo n.º 8
0
def print_view(p_view):
    printer = PrettyPrinter()
    return printer.print_list(p_view.todos)
Exemplo n.º 9
0
def print_view(p_view):
    printer = PrettyPrinter()
    return printer.print_list(p_view.todos)