Hi there,

I want to put my function definitions and docs to functions in one Python file. So my Python script contains comments in reST syntax. How can I generate a reST file from comments in the Python script? 

I wanna get an HTML file like the one on Python.org's docs. http://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.svd.html 

But I just do not want to rewrite the reST code. I want to find an automated way to extract it from my Python script. 

My function looks like this:
def dd(a,b):
    """add two numbers.

    Returns
    -------------
    a + b
    """
    return a + b

Cheers,
Forrest