From: David G. <go...@py...> - 2010-12-08 14:41:21
|
On Wed, Dec 8, 2010 at 01:21, Eli Bendersky <el...@gm...> wrote: > I'm using the API of docutils to generate HTML documentation from strings of > ReST text, using docutils.core.publish_doctree and then > docutils.core.publish_from_doctree. > One problem I ran into is redirection of docutils warnings/errors which go > to stderr. Can I somehow access the Reporter object in the document and tell > it to redirect the output to some StringIO? Yes, use the warning_stream setting. See the docstring for docutils.utils.Reporter.__init__, "stream" parameter. -- David Goodger <http://python.net/~goodger> |