New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make pydoc list submodules #46056
Comments
Often python extension modules define submodules like this: static PyObject *
initfoo_xpto(void)
{
PyObject *m;
m = Py_InitModule3("foo.xpto", foo_xpto_functions, NULL);
[...]
return m;
}
PyMODINIT_FUNC
initfoo(void)
{
PyObject *m;
PyObject *submodule;
m = Py_InitModule3("foo", foo_functions, NULL);
[...]
submodule = initfoo_xpto();
Py_INCREF(submodule);
PyModule_AddObject(m, "xpto", submodule);
} Unfortunately pydoc does not list these submodules. Attached patch |
This patch duplicates entries for "package contents" and "submodules"; NAME FILE PACKAGE CONTENTS SUBMODULES |
This should be a better patch, although it only applies to the text |
The patch only amends TextDoc -- what about HtmlDoc? |
Actually, HtmlDoc already lists all module members in the inspected >>> import pydoc
>>> from test import pydocfodder
>>> pydoc.writedoc(pydocfodder)
wrote test.pydocfodder.html ... and check that test.pydocfodder.html contains a reference to |
Well, I believe you. :) Committed r60178. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: