Python Forum
how to suppress not to display the package contents from pydoc!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to suppress not to display the package contents from pydoc!
#4
Looks like pydoc simply sees if the module has a __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__
Reply


Messages In This Thread
RE: how to suppress not to display the package contents from pydoc! - by bowlofred - Mar-19-2021, 03:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Information Unable to display joystick's value from Python onto display box MelfoyGray 2 655 Nov-11-2020, 02:23 AM
Last Post: MelfoyGray
  Keyboard Module Python - Suppress input while writing to window ppel123 0 1,099 Apr-08-2020, 02:51 PM
Last Post: ppel123
  Pydoc documentation doesnt work Cosmosso 4 1,718 Dec-13-2019, 08:21 AM
Last Post: Cosmosso
  display the contents of a sqlite3 database according to the dates atlass218 4 1,444 Mar-03-2019, 06:43 AM
Last Post: atlass218
  How to display <IPython.core.display.HTML object>? pythopen 2 31,516 Oct-17-2018, 06:22 PM
Last Post: pythopen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020