This repository has been archived on 2015-04-29. You can view files and clone it, but cannot push or open issues or pull requests.
psh/formatters.py
Ian Adam Naval 5565f0c4ef Update api to use chain and call
Much sexier than __call__
2015-02-26 15:37:08 -05:00

13 lines
365 B
Python

from commands import BaseCommand
class Printer(BaseCommand):
"""Simple formatter which accepts any object from the input
generator and simply prints it as if it were a string."""
def call(self):
input_generator = self.get_input_generator()
for line in input_generator:
print(str(line.decode('utf-8')))
return None