From 641bfc36974c673512f8bd2b5e82f55b2e6092d8 Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Thu, 14 Jan 2010 19:00:37 +1100 Subject: Add stream output support for the UI. --- testrepository/ui/__init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'testrepository/ui/__init__.py') diff --git a/testrepository/ui/__init__.py b/testrepository/ui/__init__.py index eac93a1..d6d4339 100644 --- a/testrepository/ui/__init__.py +++ b/testrepository/ui/__init__.py @@ -102,6 +102,17 @@ class AbstractUI(object): """ raise NotImplementedError(self.output_results) + def output_stream(self, stream): + """Show a byte stream to the user. + + This is not currently typed, but in future a MIME type may be + permitted. + + :param stream: A file like object that can be read from. The UI will + not close the file. + """ + raise NotImplementedError(self.output_results) + def output_table(self, table): """Show a table to the user. -- cgit v1.2.1