Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def discover(root, classes=[]):
- """
- Returns a list of all the sublasses and returns them. A nice way of implementing plug-ins.
- """
- for cls in root.__subclasses__():
- classes.append(cls)
- discover(cls, classes)
- return classes
Add Comment
Please, Sign In to add comment