Mar-19-2021, 03:41 AM
Looks like pydoc simply sees if the module has a
Maybe if you had one you could try deleting the path variable if it thought that pydoc was being run. That doesn't seem very safe, but it might work. Something like:
__path__
attribute. If it does, it creates the section and adds all the objects inside to the section. So I assume you have a multi-file module? Are you using a __init__.py
file?Maybe if you had one you could try deleting the path variable if it thought that pydoc was being run. That doesn't seem very safe, but it might work. Something like:
import sys if "pydoc" in sys.argv[0]: del __path__