Reputation: 43
I have a package structured like this:
a/a1/a1.py
a/a2/a2.py
a/a3/a3.py
In a3.py, I imported modules a1 and a2 like these:
import a1.a1
import a2.a2
Then I run
pydoc -w a/
It produces a.html, a.a1.html, a.a1.a1.html, a.a2.html, a.a2.a2.html, a.a3.html, a.a3.a3.html. The problem with a3 is, the links of the imports, i.e., a1.a1 and a2.a2 are a1.a1.html and a2.a2.html. They are supposed to be a.a1.a1.html and a.a2.a2.html. Anyone has any suggestions on how to fix it? Thanks
[Update]. I now change the imports in a3.py to:
import a.a1.a1
import a.a2.a2
The generated a.a3.a3.html has only one link to a as a.html. I still want links to a1.a1 and a2.a2. Any suggestions?
Upvotes: 1
Views: 375
Reputation: 40340
Well, you could:
import a.a1.a1
or from ..a1 import a1
)Upvotes: 1