I have an app I'm working on which is supposed to load games dynamically from a sub folder. This is the basic setup.
Main Folder/
games/
game1.py
...
gameN.py
main.py
In main.py I want to load all games in the games subfolder and their respective pyui file. This is so I can create new games and the main ui file can grab them. This will make extending my app with new games fairly painless.
I have tried using the __import__() function, but I have not had much luck. Do y'all have any ideas?