class CommaEndingPrettyPrinter(PrettyPrinter):

    def pprint(self, object):
        self._format(object, self._stream, 0, 0, {}, 0)
self._stream.write(',\n')

def comma_ending_prettyprint(object, stream=None, indent=1, width=80, depth
    =None):
    """Pretty-print a Python object to a stream [default is sys.stdout] with a comma at the end."""
Как я могу подавить новую строку после оператора печати?