This should work for all python files, regardless of file extension:
import importlib.machinery
modulename = importlib.machinery.SourceFileLoader('modulename','/Path/To/module.py').load_module()
This method was mentioned in the deprecation message in the imp.load_module
documentation.