def get_module(module_name):
 try:
  (module_path, module_class) = module_name.rsplit('.', 1)
  base_module = __import__(module_path, globals(), locals(), [module_class])
  module = getattr(base_module, module_class)
 except (ImportError, AttributeError, ValueError) as e:
  raise EAException(('Could not import module %s: %s' % (module_name, e)))
 return module

def get_module ( module_name ) : try : ( module_path , module_class ) = module_name . rsplit ( '.' , 1 ) base_module = __import__ ( module_path , globals ( ) , locals ( ) , [ module_class ] ) module = getattr ( base_module , module_class ) except ( ImportError , AttributeError , ValueError ) as e : raise EAException ( ( 'Could not import module %s: %s' % ( module_name , e ) ) ) return module
get an instance of the xmodule class identified by location .