How to print a reStructuredText node tree?
Question: Section [Parsing the
Document](http://docutils.sourceforge.net/docs/dev/hacking.html#parsing-the-
document) of The [Docutils Hacker's
Guide](http://docutils.sourceforge.net/docs/dev/hacking.html) mentions the
`quicktest.py` utility that can be used to print a node tree representation of
a parsed [reStructuredText](http://docutils.sourceforge.net/rst.html)
document. However I can't find `quicktest.py` anywhere in my docutils
distribution installed in `/usr/lib/python2.7/dist-packages/docutils`. Is
there other way to print the document tree?


Answer: As pointed out by @mzjn the `quicktest.py` script is available at
<https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/tools/quicktest.py>

A document tree can also be printed as follows:

    
    
    from docutils.core import publish_string
    print publish_string(rst)
    

where `rst` is a string containing reStructuredText to be processed.

