I currently have a folder structure like this:
.
├── main.py
└── parent.py
└── classes
└── subclass1.py
└── subclass2.py
└── subclass3.py
Each of the subclass
es are a subclass of parent
, and parent is an abstract class. The subclasses need to execute some functions like mix()
and meld()
, and each of these subclasses must implement mix()
and meld()
.
I would like to write main.py
such that the functions in each of the subclasses are executed, without me having to import
their files into my program. That is, I'd like something akin to the following to happen:
def main():
# Note that I don't care about the order of which these
for each subclass in the sources folder:
execute `mix()` and `meld()`
# Note that I don't mind which order the order
# of which the subclasses' functions are invoked.
Is there any way I could get this to happen?
Essentially, what I want to do is drop a bunch of classes into the classes
folder, with only mix()
and meld()
defined, and let this program run wild.