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
  Pydoc documentation doesnt work Cosmosso 5 4,382 Nov-25-2023, 11:17 PM
Last Post: vidito
  How to display <IPython.core.display.HTML object>? pythopen 3 45,979 May-06-2023, 08:14 AM
Last Post: pramod08728
Information Unable to display joystick's value from Python onto display box MelfoyGray 2 2,238 Nov-11-2020, 02:23 AM
Last Post: MelfoyGray
  Keyboard Module Python - Suppress input while writing to window ppel123 0 2,806 Apr-08-2020, 02:51 PM
Last Post: ppel123
  display the contents of a sqlite3 database according to the dates atlass218 4 2,981 Mar-03-2019, 06:43 AM
Last Post: atlass218

Forum Jump:

User Panel Messages

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