Re: Set Debug Mode?
Guenter Milde via Docutils-users <[email protected]> Sat, 19 Oct 2019 21:11:50 -0000 (UTC)
| Newsgroups | gmane.text.docutils.user |
|---|---|
| Message-ID | <[email protected]> |
On 2019-10-08, Kent Borg wrote:
> I have discovered that setting debug=True in the
> statemachine.StateMachine.__init__() call can be *very* useful. But I'm
> not calling directly. Tracing my call stack is seems to be
> reader/__init__.py Reader.parse() that would be the place to pass it
> down that doesn't.
> Is there a way to set that programmaticly? I can edit statemachine.py to
> force it, but that's both ugly and obscure. Is there a better way that I
> missed?
"debug" is one of the many configuration settings
http://docutils.sourceforge.net/docs/user/config.html#debug
You can either set it in a local configuration file, or via the
`settings_overrides` argument to the `core.publish_*()` functions, e.g.
parts = docutils.core.publish_parts(...
settings_overrides={debug: True})
See the Docutils test suite for code examples and
http://docutils.sourceforge.net/docs/api/publisher.html
for general documentation on use of Docutils as a library.
Günter
_______________________________________________
Docutils-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-users
Please use "Reply All" to reply to the list.