小编Már*_*cio的帖子

Make Read the Docs包括特殊成员的autodoc文档?

我有一个模块,有两个记录的全球特殊成员.

在本地运行Sphinx会创建包含其文档的文档,但"阅读文档"却没有.它使用内置类型的文档.

我尝试了两种样式:#:和定义后的docstring.我已多次阅读autodoc的文档,并阅读了文档条目.我无法弄清楚我缺少什么,因为我甚至没有看到阅读文档中的任何构建错误.

有任何想法吗?

python documentation python-sphinx autodoc read-the-docs

21
推荐指数
1
解决办法
423
查看次数

使用 `entry_points` 添加一个 setuptools 命令

是否可以setuptools使用调用的entry_points参数将自定义命令添加到项目中setup()

例如,我已将此添加到setup()项目的调用中:

entry_points = {
    'distutils.commands': [
        'abc = sphinx.setup_command:BuildDoc',
    ],
},
Run Code Online (Sandbox Code Playgroud)

但是abc当我这样做时我仍然没有得到任何命令python setup.py --help-commands。有任何想法吗?

https://pythonhosted.org/setuptools/setuptools.html#adding-commands

python setuptools

5
推荐指数
1
解决办法
415
查看次数

从`forkpty`子进程读取:`ls /`输出产生`EIO`

我试图使用forkptyexecvp一个ls /,然后从父进程读取它的输出和写入到stdout.

我得到了它的工作,并在Valgrind下运行它也没有显示任何错误.

编辑:Valgrind没有显示内存错误.Valgrind下的最后一个read收益率EIO.

但是,最后一个read总是返回-1并设置errnoEIO.我一直在研究和阅读手册页,但我仍然不明白为什么会发生这种情况:

  EIO    I/O  error.  This will happen for example when the process is in
         a background process group, tries to read from  its  controlling
         terminal,  and  either it is ignoring or blocking SIGTTIN or its
         process group is orphaned.  It may also occur when  there  is  a
         low-level I/O error while reading from a disk or tape.
Run Code Online (Sandbox Code Playgroud)

我还注意到,如果我捕获 …

c ipc pty execvp

5
推荐指数
1
解决办法
434
查看次数