我有以下两门课:
class Test1():
"""Test1()"""
def fn_test1():
"""fn_test1 """
print "Hello1"
一。在
^{pr2}$这些类存储在不同的文件夹中,如下所示:
$ tree -A
.
├── docs
│ ├── _build
│ ├── conf.py
│ ├── index.rst
│ ├── make.bat
│ ├── Makefile
│ ├── _static
│ ├── _templates
│ └── Test1.rst
└── src
└── standard
├── test1
│ └── Test1.py
└── test2
└── Test2.py
我试图运行sphinx apidoc,但它只通过以下命令找到Test1.rst:
$ sphinx-apidoc -f -A "Author" -H "Test project" -V "version 1.0" -R "release 2014" -F -d 4 -e -P -o docs /home/u/tmp/sphinx/src/standard/*
Creating file docs/Test1.rst.
Creating file docs/conf.py.
Creating file docs/index.rst.
Creating file docs/Makefile.
Creating file docs/make.bat.
如果我移除*它什么也找不到:
$ sphinx-apidoc -f -A "Author" -H "Test project" -V "version 1.0" -R "release 2014" -F -d 4 -e -P -o docs /home/u/tmp/sphinx/src/standard/
Creating file docs/conf.py.
Creating file docs/index.rst.
Creating file docs/Makefile.
Creating file docs/make.bat.
怎么可能调用sphinxapidoc找到Test1.py和Test2.py?在
Python打包依赖于目录树。所以从您所做的来看,标准是一个包含两个“子包”的包,test1和test2。每个子包都包含一个模块,Test1或Test2。在
您必须在每个包含包的目录中添加一个名为\uuinit_u.py的空文件,然后运行
没有*标志。在
相关问题 更多 >
编程相关推荐