Example #1
0
    def __init__(self, indent=1, width=80, depth=None, stream=None):
        """Handle pretty printing operations onto a stream using a set of
        configured parameters.

        indent
            Number of spaces to indent for each level of nesting.

        width
            Attempted maximum number of columns in the output.

        depth
            The maximum depth to print out nested structures.

        stream
            The desired output stream.  If omitted (or false), the standard
            output stream available at construction will be used."""

        PrettyPrinter.__init__(self,
                               indent=1,
                               width=80,
                               depth=None,
                               stream=None)
Example #2
0
 def __init__(self, *args, **kwargs):
     self.maxlist = kwargs.pop('maxlist', 6)
     self.maxdict = kwargs.pop('maxdict', 4)
     PrettyPrinter.__init__(self, *args, **kwargs)
Example #3
0
 def __init__(self, per_line_indent=0, **kwargs):
     self.__per_line_indent_str = ' ' * per_line_indent
     PrettyPrinter.__init__(self, **kwargs)
Example #4
0
 def __init__(self, *args, **kwargs):
     self.threshold = kwargs.pop("threshold", 200)
     PrettyPrinter.__init__(self, *args, **kwargs)
Example #5
0
 def __init__(self, per_line_indent=0, **kwargs):
     self.__per_line_indent_str = ' ' * per_line_indent
     PrettyPrinter.__init__(self, **kwargs)
Example #6
0
 def __init__(self, *args, **kwargs):
     self.threshold = kwargs.pop('threshold', 200)
     PrettyPrinter.__init__(self, *args, **kwargs)