def write(self, api_doc, **options):
        result = []
        out = result.append

        self._show_private = options.get('show_private', True)
        self._cols = options.get('cols', 75)

        try:
            if isinstance(api_doc, ModuleDoc):
                self.write_module(out, api_doc)
            elif isinstance(api_doc, ClassDoc):
                self.write_class(out, api_doc)
            elif isinstance(api_doc, RoutineDoc):
                self.write_function(out, api_doc)
            else:
                assert 0, ('%s not handled yet' % api_doc.__class__)
        except Exception, e:
            print '\n\n'
            print ''.join(result)
            raise

        return ''.join(result)
dataset/ETHPy150Open CollabQ/CollabQ/vendor/epydoc/docwriter/plaintext.py/PlaintextWriter.write/original