David Goodger | 8 Dec 2010 15:40
Favicon

Re: programmatic access to Reporter

On Wed, Dec 8, 2010 at 01:21, Eli Bendersky <eliben <at> gmail.com> 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>

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d

Gmane