Is it possible in python to get a list of modules from a folder/package and import them?
I would like to be able to do this from a function inside a class, so that the entire class has access to them (possibly done from the __init__ method).
Any help would be greatly appreciated.
See the modules document.
Yes, you could find a way to do this by doing a directory listing for the files in the directory and import them manually. But there isn’t built-in syntax for what you’re asking.