def modules(modulePath):
 try:
  mod = sys.modules[modulePath]
  if (mod is None):
   raise KeyError()
 except KeyError:
  __import__(modulePath)
  mod = sys.modules[modulePath]
 return mod

def modules ( modulePath ) : try : mod = sys . modules [ modulePath ] if ( mod is None ) : raise KeyError ( ) except KeyError : __import__ ( modulePath ) mod = sys . modules [ modulePath ] return mod
returns the available modules .