Any way of getting PyDoc into Jira Confluence
Question: I'm using PyDoc to generate documentation from my Python code and I'm using
Jira's Confluence plugin to manage documentation. Is there any way to
generating PyDoc documentation and putting it into Confluence?

Googling didn't yield too many results.

Thanks everyone


Answer: You can try something like this:

    
    
    from pydoc import *
    import io
    
    d = HTMLDoc()
    content = d.docmodule(sys.modules["mymodule"])
    
    f = io.open('./out.html', 'w')
    f.write(unicode(content))
    f.close()
    

You now have an HTML file containing the pydoc info. The next trick is to get
it into Confluence so that it looks nice. I have so far tried importing it
into Microsoft Word as an .rtf, then cut-and-paste into Confluence.

