Using exec()
is generally regarded as bad practice (http://stackoverflow.com/questions/1933451/why-should-exec-and-eval-be-avoidedhttps://stackoverflow.com/questions/1933451/why-should-exec-and-eval-be-avoided). Since you are trying to import a module, you can do the same by using the importlib
package.
Python 2: https://docs.python.org/2/library/importlib.html
Python 3: https://docs.python.org/3/library/importlib.html#module-importlib
Using it should clean up the rest of the code as well.
You might also be interested in this discussion for more possibilities regarding imports: http://stackoverflow.com/questions/1057431/loading-all-modules-in-a-folder-in-pythonhttps://stackoverflow.com/questions/1057431/loading-all-modules-in-a-folder-in-python
Edit 2: Removed my code example, as @janne-karila's solution is even shorter and more concise.