You must have a module to reboot. when you use from foo import bar , if bar not a module (it looks like it is not, in your case) you will have to use another import statement.
from myModules.myModule import myClass
If for some reason you do not need two imports, the already imported module can also be found in sys.modules
source share