#!C:/dev/python25/python.exe # coding: utf-8 """ A simple "this is a test." string and the output. >>> test_wordml( "this is a test." ) this is a test. """ from docutils import core, io def test_wordml( input_string ): overrides = { 'template' : '../template.xml' } parts = core.publish_string( input_string, writer_name='docutils_wordml', settings_overrides=overrides ) print parts def _test(): import doctest doctest.testmod() if __name__ == "__main__": _test()