On this page
pyclbr.readmodule
Prev: pyclbr.Function | Up: pyclbr | Next: pyclbr.readmodule_ex
Rel: pyclbr.Class, pyclbr.Function, pyclbr.readmodule_ex
Ref: docs.python.org — pyclbr.readmodule
Tags: #public #python3 #stdlib #pyclbr
Import
import pyclbr
from pyclbr import readmodule
Signature & Overview
pyclbr.readmodule(module, path=None)
Return Class objects for the top-level classes in module.
Usage
import pyclbr
classes = pyclbr.readmodule("cmd")
assert "Cmd" in classes
Gotchas
- Classes only: Use
readmodule_ex()to include top-level functions too.
REPL Inspect
from pyclbr import readmodule
help(readmodule)
Linked from
Related notes
- tuts/python3/stdlib_module/pyclbr/Class Linked here; links to this page; shared tags: #pyclbr, #stdlib
- tuts/python3/stdlib_module/pyclbr/Function Linked here; links to this page; shared tags: #pyclbr, #stdlib
- tuts/python3/stdlib_module/pyclbr/readmodule_ex Linked here; links to this page; shared tags: #pyclbr, #stdlib
- tuts/python3/stdlib_module/pyclbr Linked here; links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib
- tuts/c/stdlib/ctype shared tags: #stdlib
- tuts/c/stdlib/ctype/isalpha shared tags: #stdlib