2006年02月09日 星期四 22:11
我打算用epydoc以及restructuredtext对我的Python项目进行文档化,不过epydoc
最新版本是2.1版,是2004年最后更新的,不知道对Python2.4的支持如何。
我在Python2.4下从源文件安装了epydoc-2.1(Debian下的没有python2.4-epydoc
包)。然后从 docutils.sourceforge.net下载了一个用rst注释的例子Python代码
(statemachine.py,见附件)
然后试图生成API文档,结果报了不少错误:
rhodium:~# epydoc --docformat restructuredtext statemachine.py
Importing 1 modules.
[.]
Building API documentation for 1 modules.
[.]
/usr/lib/python2.4/site-packages/epydoc/markup/restructuredtext.py:174:
DeprecationWarning: docutils.utils.Reporter.set_conditions deprecated;
set attributes via configuration settings or directly
document.reporter.set_conditions('', 10000, 10000, None)
===========================================================================
/root/statemachine.py
In statemachine docstring (line 7):
---------------------------------------------------------------------------
- Error: Internal error: 'int' object is not callable
===========================================================================
/root/statemachine.py
In statemachine.string2lines docstring (line 1459):
---------------------------------------------------------------------------
- Error: Internal error: 'int' object is not callable
===========================================================================
/root/statemachine.py
In statemachine._exception_data docstring (line 1478):
---------------------------------------------------------------------------
- Error: Internal error: 'int' object is not callable
生成的结果文档中所有rst格式的注释都被当成了普通文本。似乎epydoc2.1对
restructuredtext的支持有些旧了。
不知道各位有没有用过python2.4+epydoc+rst的?docutils我安装的是0.3.9版的。
或者除epydoc外还有什么别的软件可以自动从docstring生成API文档的?
Hong Yuan
大管家网上建材超市
http://www.homemaster.cn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: statemachine.py
Type: text/x-python
Size: 55377 bytes
Desc: not available
Url : http://lists.exoweb.net/pipermail/python-chinese/attachments/20060209/2d406cc2/statemachine-0001.py
2006年02月09日 星期四 22:46
On 2/9/06, Hong Yuan <hongyuan at homemaster.cn> wrote: > 我打算用epydoc以及restructuredtext对我的Python项目进行文档化,不过epydoc > 最新版本是2.1版,是2004年最后更新的,不知道对Python2.4的支持如何。 > > 我在Python2.4下从源文件安装了epydoc-2.1(Debian下的没有python2.4-epydoc > 包)。然后从 docutils.sourceforge.net下载了一个用rst注释的例子Python代码 > (statemachine.py,见附件) > > 然后试图生成API文档,结果报了不少错误: > > rhodium:~# epydoc --docformat restructuredtext statemachine.py > Importing 1 modules. > [.] > Building API documentation for 1 modules. > [.] > /usr/lib/python2.4/site-packages/epydoc/markup/restructuredtext.py:174: > DeprecationWarning: docutils.utils.Reporter.set_conditions deprecated; > set attributes via configuration settings or directly > document.reporter.set_conditions('', 10000, 10000, None) > =========================================================================== > /root/statemachine.py > In statemachine docstring (line 7): > --------------------------------------------------------------------------- > - Error: Internal error: 'int' object is not callable > > =========================================================================== > /root/statemachine.py > In statemachine.string2lines docstring (line 1459): > --------------------------------------------------------------------------- > - Error: Internal error: 'int' object is not callable > > =========================================================================== > /root/statemachine.py > In statemachine._exception_data docstring (line 1478): > --------------------------------------------------------------------------- > - Error: Internal error: 'int' object is not callable > > 生成的结果文档中所有rst格式的注释都被当成了普通文本。似乎epydoc2.1对 > restructuredtext的支持有些旧了。 > > 不知道各位有没有用过python2.4+epydoc+rst的?docutils我安装的是0.3.9版的。 > > 或者除epydoc外还有什么别的软件可以自动从docstring生成API文档的? > > Hong Yuan > > 大管家网上建材超市 > http://www.homemaster.cn > > epydoc用得不多。有一个叫pudge的项目可以看一下。 -- I like python! My Blog: http://www.donews.net/limodou NewEdit Maillist: http://groups.google.com/group/NewEdit
2006年02月10日 星期五 00:20
limodou wrote: > epydoc用得不多。有一个叫pudge的项目可以看一下。 > > -- > I like python! > My Blog: http://www.donews.net/limodou > NewEdit Maillist: http://groups.google.com/group/NewEdit > 看着好像不错。但check out试图安装时出现错误: Installed /usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg Processing dependencies for pudge==0.1 Searching for docutils Reading http://www.python.org/pypi/docutils/ Reading http://docutils.sourceforge.net/ Best match: docutils 0.4 Downloading http://prdownloads.sourceforge.net/docutils/docutils-0.4.tar.gz?download Requesting redirect to (randomly selected) 'easynews' mirror error: No META HTTP-EQUIV="refresh" found in Sourceforge page at http://prdownloads.sourceforge.net/docutils/docutils-0.4.tar.gz?use_mirror=easynews 其实我已经从源码安装了最新的docutils 0.4版了。不知有哪位用过pudge的可以 给点提示?
2006年02月10日 星期五 09:01
On 2/10/06, Hong Yuan <hongyuan at homemaster.cn> wrote: > limodou wrote: > > epydoc用得不多。有一个叫pudge的项目可以看一下。 > > > > -- > > I like python! > > My Blog: http://www.donews.net/limodou > > NewEdit Maillist: http://groups.google.com/group/NewEdit > > > 看着好像不错。但check out试图安装时出现错误: > > Installed /usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg > Processing dependencies for pudge==0.1 > Searching for docutils > Reading http://www.python.org/pypi/docutils/ > Reading http://docutils.sourceforge.net/ > Best match: docutils 0.4 > Downloading > http://prdownloads.sourceforge.net/docutils/docutils-0.4.tar.gz?download > Requesting redirect to (randomly selected) 'easynews' mirror > error: No META HTTP-EQUIV="refresh" found in Sourceforge page at > http://prdownloads.sourceforge.net/docutils/docutils-0.4.tar.gz?use_mirror=easynews > > 其实我已经从源码安装了最新的docutils 0.4版了。不知有哪位用过pudge的可以 > 给点提示? > 我倒是用了一下,不过版本可能比你旧,倒是没有出现安装错误,就是不会用,也没有仔细研究。 -- I like python! My Blog: http://www.donews.net/limodou NewEdit Maillist: http://groups.google.com/group/NewEdit
2006年02月10日 星期五 11:30
On 2/10/06, Hong Yuan <hongyuan at homemaster.cn> wrote: > limodou wrote: > > epydoc用得不多。有一个叫pudge的项目可以看一下。 > > > > -- > > I like python! > > My Blog: http://www.donews.net/limodou > > NewEdit Maillist: http://groups.google.com/group/NewEdit > > > 看着好像不错。但check out试图安装时出现错误: > > Installed /usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg > Processing dependencies for pudge==0.1 > Searching for docutils > Reading http://www.python.org/pypi/docutils/ > Reading http://docutils.sourceforge.net/ > Best match: docutils 0.4 > Downloading > http://prdownloads.sourceforge.net/docutils/docutils-0.4.tar.gz?download > Requesting redirect to (randomly selected) 'easynews' mirror > error: No META HTTP-EQUIV="refresh" found in Sourceforge page at > http://prdownloads.sourceforge.net/docutils/docutils-0.4.tar.gz?use_mirror=easynews > 这个是 setuptools的错, 找不到sourceforge的下载链接, 升级一下setuptools 或者老老实实自己下载安装 -- simple is good http://datastrategy.org/number5
Zeuux © 2025
京ICP备05028076号